Browse Source

Remove spurious where initialization

Samuel Thibault 9 years ago
parent
commit
9ebf0fcd00

+ 1 - 2
examples/basic_examples/vector_scal.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010, 2011, 2012, 2013, 2015  CNRS
- * Copyright (C) 2010-2014  Université de Bordeaux
+ * Copyright (C) 2010-2015  Université de Bordeaux
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -52,7 +52,6 @@ static struct starpu_perfmodel vector_scal_power_model =
 
 static struct starpu_codelet cl =
 {
-	.where = STARPU_CPU | STARPU_CUDA | STARPU_OPENCL | STARPU_MIC,
 	/* CPU implementation of the codelet */
 	.cpu_funcs =
 	{

+ 2 - 4
examples/fortran90/marshalling.c

@@ -58,8 +58,7 @@ void loop_element_cpu_func(void *buffers[], void *cl_arg);
 
 struct starpu_codelet cl_loop_element =
 {
-	.where = STARPU_CPU,
-	.cpu_funcs = {loop_element_cpu_func, NULL},
+	.cpu_funcs = {loop_element_cpu_func},
 	.nbuffers = 3,
 	.modes = {STARPU_R,STARPU_RW,STARPU_R},
 	.name = "LOOP_ELEMENT"
@@ -115,8 +114,7 @@ void copy_element_cpu_func(void *buffers[], void *cl_arg);
 
 struct starpu_codelet cl_copy_element =
 {
-	.where = STARPU_CPU,
-	.cpu_funcs = {copy_element_cpu_func, NULL},
+	.cpu_funcs = {copy_element_cpu_func},
 	.nbuffers = 2,
 	.modes = {STARPU_RW,STARPU_R},
 	.name = "COPY_ELEMENT"

+ 0 - 9
examples/heat/dw_sparse_cg.c

@@ -139,7 +139,6 @@ void init_cg(struct cg_problem *problem)
 
 	/* r = b  - A x */
 	struct starpu_task *task1 = create_task(1UL);
-	task1->cl->where = STARPU_CPU;
 	task1->cl->cpu_funcs[0] = cpu_codelet_func_1;
 	task1->cl->cpu_funcs_name[0] = "cpu_codelet_func_1";
 	task1->cl->nbuffers = 4;
@@ -155,7 +154,6 @@ void init_cg(struct cg_problem *problem)
 
 	/* d = r */
 	struct starpu_task *task2 = create_task(2UL);
-	task2->cl->where = STARPU_CPU;
 	task2->cl->cpu_funcs[0] = cpu_codelet_func_2;
 	task2->cl->cpu_funcs_name[0] = "cpu_codelet_func_2";
 	task2->cl->nbuffers = 2;
@@ -169,7 +167,6 @@ void init_cg(struct cg_problem *problem)
 
 	/* delta_new = trans(r) r */
 	struct starpu_task *task3 = create_task(3UL);
-	task3->cl->where = STARPU_CUDA|STARPU_CPU;
 #ifdef STARPU_USE_CUDA
 	task3->cl->cuda_funcs[0] = cublas_codelet_func_3;
 #endif
@@ -211,7 +208,6 @@ void launch_new_cg_iteration(struct cg_problem *problem)
 
 	/* q = A d */
 	struct starpu_task *task4 = create_task(maskiter | 4UL);
-	task4->cl->where = STARPU_CPU;
 	task4->cl->cpu_funcs[0] = cpu_codelet_func_4;
 	task4->cl->cpu_funcs_name[0] = "cpu_codelet_func_4";
 	task4->cl->nbuffers = 3;
@@ -225,7 +221,6 @@ void launch_new_cg_iteration(struct cg_problem *problem)
 
 	/* alpha = delta_new / ( trans(d) q )*/
 	struct starpu_task *task5 = create_task(maskiter | 5UL);
-	task5->cl->where = STARPU_CUDA|STARPU_CPU;
 #ifdef STARPU_USE_CUDA
 	task5->cl->cuda_funcs[0] = cublas_codelet_func_5;
 #endif
@@ -244,7 +239,6 @@ void launch_new_cg_iteration(struct cg_problem *problem)
 
 	/* x = x + alpha d */
 	struct starpu_task *task6 = create_task(maskiter | 6UL);
-	task6->cl->where = STARPU_CUDA|STARPU_CPU;
 #ifdef STARPU_USE_CUDA
 	task6->cl->cuda_funcs[0] = cublas_codelet_func_6;
 #endif
@@ -263,7 +257,6 @@ void launch_new_cg_iteration(struct cg_problem *problem)
 
 	/* r = r - alpha q */
 	struct starpu_task *task7 = create_task(maskiter | 7UL);
-	task7->cl->where = STARPU_CUDA|STARPU_CPU;
 #ifdef STARPU_USE_CUDA
 	task7->cl->cuda_funcs[0] = cublas_codelet_func_7;
 #endif
@@ -282,7 +275,6 @@ void launch_new_cg_iteration(struct cg_problem *problem)
 
 	/* update delta_* and compute beta */
 	struct starpu_task *task8 = create_task(maskiter | 8UL);
-	task8->cl->where = STARPU_CUDA|STARPU_CPU;
 #ifdef STARPU_USE_CUDA
 	task8->cl->cuda_funcs[0] = cublas_codelet_func_8;
 #endif
@@ -298,7 +290,6 @@ void launch_new_cg_iteration(struct cg_problem *problem)
 
 	/* d = r + beta d */
 	struct starpu_task *task9 = create_task(maskiter | 9UL);
-	task9->cl->where = STARPU_CUDA|STARPU_CPU;
 #ifdef STARPU_USE_CUDA
 	task9->cl->cuda_funcs[0] = cublas_codelet_func_9;
 #endif

+ 0 - 6
examples/lu/xlu_kernels.c

@@ -136,7 +136,6 @@ static int can_execute(unsigned workerid, struct starpu_task *task, unsigned nim
 #define STRINGIFY(x) STRINGIFY_(x)
 struct starpu_codelet cl22 =
 {
-	.where = STARPU_CPU|STARPU_CUDA,
 	.cpu_funcs = {STARPU_LU(cpu_u22)},
 	.cpu_funcs_name = {STRINGIFY(STARPU_LU(cpu_u22))},
 #ifdef STARPU_USE_CUDA
@@ -225,7 +224,6 @@ static struct starpu_perfmodel STARPU_LU(model_12) =
 
 struct starpu_codelet cl12 =
 {
-	.where = STARPU_CPU|STARPU_CUDA,
 	.cpu_funcs = {STARPU_LU(cpu_u12)},
 	.cpu_funcs_name = {STRINGIFY(STARPU_LU(cpu_u12))},
 #ifdef STARPU_USE_CUDA
@@ -312,7 +310,6 @@ static struct starpu_perfmodel STARPU_LU(model_21) =
 
 struct starpu_codelet cl21 =
 {
-	.where = STARPU_CPU|STARPU_CUDA,
 	.cpu_funcs = {STARPU_LU(cpu_u21)},
 	.cpu_funcs_name = {STRINGIFY(STARPU_LU(cpu_u21))},
 #ifdef STARPU_USE_CUDA
@@ -416,7 +413,6 @@ static struct starpu_perfmodel STARPU_LU(model_11) =
 
 struct starpu_codelet cl11 =
 {
-	.where = STARPU_CPU|STARPU_CUDA,
 	.cpu_funcs = {STARPU_LU(cpu_u11)},
 	.cpu_funcs_name = {STRINGIFY(STARPU_LU(cpu_u11))},
 #ifdef STARPU_USE_CUDA
@@ -560,7 +556,6 @@ static struct starpu_perfmodel STARPU_LU(model_11_pivot) =
 
 struct starpu_codelet cl11_pivot =
 {
-	.where = STARPU_CPU|STARPU_CUDA,
 	.cpu_funcs = {STARPU_LU(cpu_u11_pivot)},
 	.cpu_funcs_name = {STRINGIFY(STARPU_LU(cpu_u11_pivot))},
 #ifdef STARPU_USE_CUDA
@@ -651,7 +646,6 @@ static struct starpu_perfmodel STARPU_LU(model_pivot) =
 
 struct starpu_codelet cl_pivot =
 {
-	.where = STARPU_CPU|STARPU_CUDA,
 	.cpu_funcs = {STARPU_LU(cpu_pivot)},
 	.cpu_funcs_name = {STRINGIFY(STARPU_LU(cpu_pivot))},
 #ifdef STARPU_USE_CUDA

+ 1 - 2
examples/sched_ctx/parallel_tasks_reuse_handle.c

@@ -60,8 +60,7 @@ void noop(void * buffers[], void * cl_arg)
 
 static struct starpu_codelet init_parallel_worker_cl=
 {
-	.where = STARPU_CPU,
-	.cpu_funcs = {noop, NULL},
+	.cpu_funcs = {noop},
 	.nbuffers = 0,
 	.name = "init_parallel_worker"
 };

+ 0 - 6
examples/scheduler/heteroprio_test.c

@@ -134,11 +134,9 @@ int main(int argc, char** argv)
 		codeleteA.modes[1] = STARPU_RW;
 		codeleteA.name = "codeleteA";
 #ifdef STARPU_USE_CPU
-		codeleteA.where = STARPU_CPU;
 		codeleteA.cpu_funcs[0] = callback_a_cpu;
 #endif
 #ifdef STARPU_USE_OPENCL
-		codeleteA.where |= STARPU_OPENCL;
 		codeleteA.opencl_funcs[0] = callback_a_opencl;
 #endif
 	}
@@ -149,10 +147,8 @@ int main(int argc, char** argv)
 		codeleteB.modes[0] = STARPU_RW;
 		codeleteB.modes[1] = STARPU_RW;
 		codeleteB.name = "codeleteB";
-		codeleteB.where = STARPU_CPU;
 		codeleteB.cpu_funcs[0] = callback_b_cpu;
 #ifdef STARPU_USE_OPENCL
-		codeleteB.where |= STARPU_OPENCL;
 		codeleteB.opencl_funcs[0] = callback_b_opencl;
 #endif
 	}
@@ -163,10 +159,8 @@ int main(int argc, char** argv)
 		codeleteC.modes[0] = STARPU_RW;
 		codeleteC.modes[1] = STARPU_RW;
 		codeleteC.name = "codeleteC";
-		codeleteC.where = STARPU_CPU;
 		codeleteC.cpu_funcs[0] = callback_c_cpu;
 #ifdef STARPU_USE_OPENCL
-		codeleteC.where |= STARPU_OPENCL;
 		codeleteC.opencl_funcs[0] = callback_c_opencl;
 #endif
 	}