Explorar o código

partly revert #13024 as function similar to starpu_worker_get_as_string already existed, its name is starpu_perfmodel_get_archtype_name

Nathalie Furmento %!s(int64=11) %!d(string=hai) anos
pai
achega
0600561b91
Modificáronse 3 ficheiros con 1 adicións e 14 borrados
  1. 0 2
      include/starpu_worker.h
  2. 1 1
      src/core/perfmodel/perfmodel_history.c
  3. 0 11
      src/core/workers.c

+ 0 - 2
include/starpu_worker.h

@@ -117,8 +117,6 @@ unsigned starpu_worker_get_sched_ctx_list(int worker, unsigned **sched_ctx);
 
 unsigned starpu_worker_is_slave(int workerid);
 
-char *starpu_worker_get_as_string(enum starpu_worker_archtype type);
-
 #ifdef __cplusplus
 }
 #endif

+ 1 - 1
src/core/perfmodel/perfmodel_history.c

@@ -1403,7 +1403,7 @@ int starpu_perfmodel_list_combs(FILE *output, struct starpu_perfmodel *model)
 		fprintf(output, "\tComb %d: %d device%s\n", model->combs[comb], arch->ndevices, arch->ndevices>1?"s":"");
 		for(device=0 ; device<arch->ndevices ; device++)
 		{
-			char *name = starpu_worker_get_as_string(arch->devices[device].type);
+			char *name = starpu_perfmodel_get_archtype_name(arch->devices[device].type);
 			fprintf(output, "\t\tDevice %d: type: %s - devid: %d - ncores: %d\n", device, name, arch->devices[device].devid, arch->devices[device].ncores);
 		}
 	}

+ 0 - 11
src/core/workers.c

@@ -1987,14 +1987,3 @@ unsigned starpu_worker_get_sched_ctx_list(int workerid, unsigned **sched_ctxs)
 	return nsched_ctxs;
 }
 
-char *starpu_worker_get_as_string(enum starpu_worker_archtype type)
-{
-	if (type == STARPU_CPU_WORKER) return "CPU";
-	if (type == STARPU_CUDA_WORKER) return "CUDA";
-	if (type == STARPU_OPENCL_WORKER) return "OPENCL";
-	if (type == STARPU_MIC_WORKER) return "MIC";
-	if (type == STARPU_SCC_WORKER) return "SCC";
-	if (type == STARPU_ANY_WORKER) return "ANY";
-	return "undefined";
-}
-