Browse Source

prefix objects with starpu_

Nathalie Furmento 15 years ago
parent
commit
94751daa0a

+ 1 - 1
examples/mult/dw_mult.c

@@ -181,7 +181,7 @@ static void partition_mult_data(void)
 }
 
 static starpu_codelet cl = {
-	.where = CORE|CUDA|GORDON,
+	.where = STARPU_CORE|STARPU_CUDA|STARPU_GORDON,
 	.core_func = core_mult,
 #ifdef USE_CUDA
 	.cuda_func = cublas_mult,

+ 1 - 1
examples/tag_example/tag_example3.c

@@ -122,7 +122,7 @@ int main(int argc __attribute__((unused)) , char **argv __attribute__((unused)))
 #ifdef USE_GORDON
 	cl.gordon_func = gordon_null_kernel;
 #endif
-	cl.where = CORE|CUDA|GORDON;
+	cl.where = STARPU_CORE|STARPU_CUDA|STARPU_GORDON;
 	cl.nbuffers = 0;
 
 	fprintf(stderr, "ITER : %d\n", nk);

+ 2 - 2
src/core/perfmodel/perfmodel.c

@@ -67,10 +67,10 @@ static double common_task_expected_length(struct starpu_perfmodel_t *model, uint
 		exp = model->cost_model(task->buffers);
 		switch (who) {
 			case STARPU_CORE:
-				alpha = CORE_ALPHA;
+				alpha = STARPU_CORE_ALPHA;
 				break;
 			case STARPU_CUDA:
-				alpha = CUDA_ALPHA;
+				alpha = STARPU_CUDA_ALPHA;
 				break;
 			default:
 				/* perhaps there are various worker types on that queue */

+ 2 - 2
src/core/topology.c

@@ -238,8 +238,8 @@ static int _starpu_init_machine_config(struct machine_config_s *config,
 		config->workers[config->nworkers + spu].perf_arch = STARPU_GORDON_DEFAULT;
 		config->workers[config->nworkers + spu].id = spu;
 		config->workers[config->nworkers + spu].worker_is_running = 0;
-		config->workers[config->nworkers + spu].worker_mask = GORDON;
-		config->worker_mask |= GORDON;
+		config->workers[config->nworkers + spu].worker_mask = STARPU_GORDON;
+		config->worker_mask |= STARPU_GORDON;
 	}
 
 	config->nworkers += config->ngordon_spus;

+ 3 - 3
src/core/workers.c

@@ -73,13 +73,13 @@ static void _starpu_init_worker_queue(struct worker_s *workerarg)
 
 	switch (workerarg->arch) {
 		case STARPU_CORE_WORKER:
-			jobq->alpha = CORE_ALPHA;
+			jobq->alpha = STARPU_CORE_ALPHA;
 			break;
 		case STARPU_CUDA_WORKER:
-			jobq->alpha = CUDA_ALPHA;
+			jobq->alpha = STARPU_CUDA_ALPHA;
 			break;
 		case STARPU_GORDON_WORKER:
-			jobq->alpha = GORDON_ALPHA;
+			jobq->alpha = STARPU_GORDON_ALPHA;
 			break;
 		default:
 			STARPU_ABORT();

+ 3 - 3
src/core/workers.h

@@ -50,9 +50,9 @@
 
 #include <datawizard/datawizard.h>
 
-#define CORE_ALPHA	1.0f
-#define CUDA_ALPHA	13.33f
-#define GORDON_ALPHA	6.0f /* XXX this is a random value ... */
+#define STARPU_CORE_ALPHA	1.0f
+#define STARPU_CUDA_ALPHA	13.33f
+#define STARPU_GORDON_ALPHA	6.0f /* XXX this is a random value ... */
 
 #ifdef DATA_STATS
 #define BENCHMARK_COMM	1

+ 3 - 3
src/drivers/gordon/driver_gordon.c

@@ -274,7 +274,7 @@ int inject_task_list(struct job_list_s *list, struct worker_s *worker)
 //	
 //	for (j = job_list_begin(list); j != job_list_end(list); j = job_list_next(j) )
 //	{
-//		if (!GORDON_MAY_PERFORM(j)) {
+//		if (!STARPU_GORDON_MAY_PERFORM(j)) {
 //			// XXX TODO
 //			ninvalids++;
 //			assert(0);
@@ -337,7 +337,7 @@ void *gordon_worker_inject(struct worker_set_s *arg)
 			int ret = 0;
 #warning we should look into the local job list here !
 
-			struct job_list_s *list = pop_every_task(GORDON);
+			struct job_list_s *list = pop_every_task(STARPU_GORDON);
 			/* XXX 0 is hardcoded */
 			if (list)
 			{
@@ -391,7 +391,7 @@ void *gordon_worker_inject(struct worker_set_s *arg)
 			j =  pop_task();
 	//		fprintf(stderr, "pop task %p\n", j);
 			if (j) {
-				if (GORDON_MAY_PERFORM(j)) {
+				if (STARPU_GORDON_MAY_PERFORM(j)) {
 					/* inject that task */
 					/* XXX we hardcore &arg->workers[0] for now */
 					inject_task(j, &arg->workers[0]);