Browse Source

examples: inside struct starpu_codelet, use xxx_funcs fields instead of the xxx_func ones

Nathalie Furmento 13 years ago
parent
commit
61940dab45
47 changed files with 225 additions and 225 deletions
  1. 3 3
      examples/audio/starpu_audio_processing.c
  2. 2 2
      examples/axpy/axpy.c
  3. 3 3
      examples/basic_examples/block.c
  4. 1 1
      examples/basic_examples/hello_world.c
  5. 1 1
      examples/basic_examples/mult.c
  6. 3 3
      examples/basic_examples/multiformat.c
  7. 4 4
      examples/basic_examples/multiformat_conversion_codelets.c
  8. 3 3
      examples/basic_examples/variable.c
  9. 3 3
      examples/basic_examples/vector_scal.c
  10. 5 5
      examples/basic_examples/vector_scal_c.c
  11. 1 1
      examples/callback/callback.c
  12. 20 20
      examples/cg/cg_kernels.c
  13. 17 17
      examples/cholesky/cholesky_grain_tag.c
  14. 6 6
      examples/cholesky/cholesky_implicit.c
  15. 6 6
      examples/cholesky/cholesky_tag.c
  16. 6 6
      examples/cholesky/cholesky_tile_tag.c
  17. 3 3
      examples/filters/fblock.c
  18. 1 1
      examples/filters/fmatrix.c
  19. 1 1
      examples/filters/fvector.c
  20. 8 8
      examples/heat/dw_factolu.c
  21. 8 8
      examples/heat/dw_factolu_grain.c
  22. 8 8
      examples/heat/dw_factolu_tag.c
  23. 15 15
      examples/heat/dw_sparse_cg.c
  24. 3 3
      examples/incrementer/incrementer.c
  25. 13 13
      examples/lu/xlu_kernels.c
  26. 4 4
      examples/mandelbrot/mandelbrot.c
  27. 1 1
      examples/matvecmult/matvecmult.c
  28. 2 2
      examples/mult/xgemm.c
  29. 1 1
      examples/openmp/vector_scal.c
  30. 2 2
      examples/opt/pi/pi.c
  31. 6 6
      examples/opt/pi/pi_redux.c
  32. 2 2
      examples/ppm_downscaler/yuv_downscaler.c
  33. 3 3
      examples/profiling/profiling.c
  34. 6 6
      examples/reductions/dot_product.c
  35. 3 3
      examples/reductions/minmax_reduction.c
  36. 3 3
      examples/scheduler/dummy_sched.c
  37. 2 2
      examples/spmv/dw_block_spmv.c
  38. 3 3
      examples/spmv/spmv.c
  39. 11 11
      examples/starpufft/starpufftx1d.c
  40. 11 11
      examples/starpufft/starpufftx2d.c
  41. 9 9
      examples/stencil/stencil-kernels.c
  42. 3 3
      examples/stencil/stencil-tasks.c
  43. 2 2
      examples/tag_example/tag_example.c
  44. 2 2
      examples/tag_example/tag_example2.c
  45. 2 2
      examples/tag_example/tag_example3.c
  46. 2 2
      examples/tag_example/tag_restartable.c
  47. 1 1
      examples/top/hello_world_top.c

+ 3 - 3
examples/audio/starpu_audio_processing.c

@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2010-2011  Université de Bordeaux 1
  * Copyright (C) 2010  Mehdi Juhoor <mjuhoor@gmail.com>
- * Copyright (C) 2010  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
  *
  * 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
@@ -276,9 +276,9 @@ struct starpu_perfmodel band_filter_model = {
 static struct starpu_codelet band_filter_cl = {
 	.where = STARPU_CPU|STARPU_CUDA,
 #ifdef STARPU_USE_CUDA
-	.cuda_func = band_filter_kernel_gpu,
+	.cuda_funcs = {band_filter_kernel_gpu, NULL},
 #endif
-	.cpu_func = band_filter_kernel_cpu,
+	.cpu_funcs = {band_filter_kernel_cpu, NULL},
 	.model = &band_filter_model,
 	.nbuffers = 1
 };

+ 2 - 2
examples/axpy/axpy.c

@@ -77,9 +77,9 @@ static struct starpu_codelet axpy_cl = {
 #endif
                 STARPU_CPU,
 
-	.cpu_func = axpy_cpu,
+	.cpu_funcs = {axpy_cpu, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = axpy_gpu,
+	.cuda_funcs = {axpy_gpu, NULL},
 #endif
 	.nbuffers = 2
 };

+ 3 - 3
examples/basic_examples/block.c

@@ -42,9 +42,9 @@ int execute_on(uint32_t where, device_func func, float *block, int pnx, int pny,
 	starpu_block_data_register(&block_handle, 0, (uintptr_t)block, pnx, pnx*pny, pnx, pny, pnz, sizeof(float));
 
 	cl.where = where;
-        cl.cuda_func = func;
-        cl.cpu_func = func;
-        cl.opencl_func = func;
+        cl.cuda_funcs[0] = func;
+        cl.cpu_funcs[0] = func;
+        cl.opencl_funcs[0] = func;
         cl.nbuffers = 1;
         cl.model = NULL;
 

+ 1 - 1
examples/basic_examples/hello_world.c

@@ -77,7 +77,7 @@ int main(int argc, char **argv)
 	/* this codelet may only be executed on a CPU, and its cpu
  	 * implementation is function "cpu_func" */
 	cl.where = STARPU_CPU;
-	cl.cpu_func = cpu_func;
+	cl.cpu_funcs[0] = cpu_func;
 	/* the codelet does not manipulate any data that is managed
 	 * by our DSM */
 	cl.nbuffers = 0;

+ 1 - 1
examples/basic_examples/mult.c

@@ -255,7 +255,7 @@ static struct starpu_codelet cl = {
         /* we can only execute that kernel on a CPU yet */
         .where = STARPU_CPU,
         /* CPU implementation of the codelet */
-        .cpu_func = cpu_mult,
+        .cpu_funcs = {cpu_mult, NULL},
         /* the codelet manipulates 3 buffers that are managed by the
          * DSM */
         .nbuffers = 3,

+ 3 - 3
examples/basic_examples/multiformat.c

@@ -71,12 +71,12 @@ extern void multiformat_scal_opencl_func(void *buffers[], void *arg);
 
 static struct starpu_codelet  cl = {
 	.where = STARPU_CUDA | STARPU_OPENCL,
-	.cpu_func = multiformat_scal_cpu_func,
+	.cpu_funcs = {multiformat_scal_cpu_func, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = multiformat_scal_cuda_func,
+	.cuda_funcs = {multiformat_scal_cuda_func, NULL},
 #endif
 #ifdef STARPU_USE_OPENCL
-	.opencl_func = multiformat_scal_opencl_func,
+	.opencl_funcs = {multiformat_scal_opencl_func, NULL},
 #endif
 	.nbuffers = 1,
 };

+ 4 - 4
examples/basic_examples/multiformat_conversion_codelets.c

@@ -33,13 +33,13 @@ void cuda_to_cpu(void *buffers[], void *arg)
 extern void cpu_to_cuda_cuda_func(void *buffers[], void *args);
 struct starpu_codelet cpu_to_cuda_cl = {
 	.where = STARPU_CUDA,
-	.cuda_func = cpu_to_cuda_cuda_func,
+	.cuda_funcs = {cpu_to_cuda_cuda_func, NULL},
 	.nbuffers = 1
 };
 
 struct starpu_codelet cuda_to_cpu_cl = {
 	.where = STARPU_CPU,
-	.cpu_func = cuda_to_cpu,
+	.cpu_funcs = {cuda_to_cpu, NULL},
 	.nbuffers = 1
 };
 #endif
@@ -61,13 +61,13 @@ void opencl_to_cpu(void *buffers[], void *arg)
 extern void cpu_to_opencl_opencl_func(void *buffers[], void *args);
 struct starpu_codelet cpu_to_opencl_cl = {
 	.where = STARPU_OPENCL,
-	.opencl_func = cpu_to_opencl_opencl_func,
+	.opencl_funcs = {cpu_to_opencl_opencl_func, NULL},
 	.nbuffers = 1
 };
 
 struct starpu_codelet opencl_to_cpu_cl = {
 	.where = STARPU_CPU,
-	.cpu_func = opencl_to_cpu,
+	.cpu_funcs = {opencl_to_cpu, NULL},
 	.nbuffers = 1
 };
 #endif

+ 3 - 3
examples/basic_examples/variable.c

@@ -57,12 +57,12 @@ int main(int argc, char **argv)
 #endif
 
 	cl.where = STARPU_CPU|STARPU_CUDA|STARPU_OPENCL;
-        cl.cpu_func = cpu_codelet;
+        cl.cpu_funcs[0] = cpu_codelet;
 #ifdef STARPU_USE_CUDA
-        cl.cuda_func = cuda_codelet;
+        cl.cuda_funcs[0] = cuda_codelet;
 #endif
 #ifdef STARPU_USE_OPENCL
-        cl.opencl_func = opencl_codelet;
+        cl.opencl_funcs[0] = opencl_codelet;
 #endif
         cl.nbuffers = 1;
         cl.model = NULL;

+ 3 - 3
examples/basic_examples/vector_scal.c

@@ -50,7 +50,7 @@ static struct starpu_perfmodel vector_scal_power_model = {
 static struct starpu_codelet cl = {
 	.where = STARPU_CPU | STARPU_CUDA | STARPU_OPENCL,
 	/* CPU implementation of the codelet */
-	.cpu_func = STARPU_MULTIPLE_CPU_IMPLEMENTATIONS,
+	.cpu_funcs = {STARPU_MULTIPLE_CPU_IMPLEMENTATIONS, NULL},
 	.cpu_funcs = {
 		scal_cpu_func
 #ifdef STARPU_HAVE_ICC
@@ -65,11 +65,11 @@ static struct starpu_codelet cl = {
 	},
 #ifdef STARPU_USE_CUDA
 	/* CUDA implementation of the codelet */
-	.cuda_func = scal_cuda_func,
+	.cuda_funcs = {scal_cuda_func, NULL},
 #endif
 #ifdef STARPU_USE_OPENCL
 	/* OpenCL implementation of the codelet */
-	.opencl_func = scal_opencl_func,
+	.opencl_funcs = {scal_opencl_func, NULL},
 #endif
 	.nbuffers = 1,
 	.model = &vector_scal_model,

+ 5 - 5
examples/basic_examples/vector_scal_c.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
  * Copyright (C) 2011  Université de Bordeaux 1
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -40,11 +40,11 @@ static struct starpu_perfmodel vector_scal_model = {
 
 static struct starpu_codelet cl = {
   .where = STARPU_CPU | STARPU_CUDA,
-	/* CPU implementation of the codelet */
-	.cpu_func = scal_cpu_func,
+  /* CPU implementation of the codelet */
+  .cpu_funcs = {scal_cpu_func, NULL},
 #ifdef STARPU_USE_CUDA
-	/* CUDA implementation of the codelet */
-	.cuda_func = scal_cuda_func,
+  /* CUDA implementation of the codelet */
+  .cuda_funcs = {scal_cuda_func, NULL},
 #endif
 	.nbuffers = 1,
 	.model = &vector_scal_model

+ 1 - 1
examples/callback/callback.c

@@ -33,7 +33,7 @@ void cpu_codelet(void *descr[], __attribute__ ((unused)) void *_args)
 struct starpu_codelet cl =
 {
 	.where = STARPU_CPU,
-	.cpu_func = cpu_codelet,
+	.cpu_funcs = {cpu_codelet, NULL},
 	.nbuffers = 1
 };
 

+ 20 - 20
examples/cg/cg_kernels.c

@@ -75,9 +75,9 @@ static struct starpu_perfmodel accumulate_variable_model = {
 
 struct starpu_codelet accumulate_variable_cl = {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = accumulate_variable_cpu,
+	.cpu_funcs = {accumulate_variable_cpu, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = accumulate_variable_cuda,
+	.cuda_funcs = {accumulate_variable_cuda, NULL},
 #endif
 	.nbuffers = 2,
 	.model = &accumulate_variable_model
@@ -111,9 +111,9 @@ static struct starpu_perfmodel accumulate_vector_model = {
 
 struct starpu_codelet accumulate_vector_cl = {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = accumulate_vector_cpu,
+	.cpu_funcs = {accumulate_vector_cpu, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = accumulate_vector_cuda,
+	.cuda_funcs = {accumulate_vector_cuda, NULL},
 #endif
 	.nbuffers = 2,
 	.model = &accumulate_vector_model
@@ -149,9 +149,9 @@ static struct starpu_perfmodel bzero_variable_model = {
 
 struct starpu_codelet bzero_variable_cl = {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = bzero_variable_cpu,
+	.cpu_funcs = {bzero_variable_cpu, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = bzero_variable_cuda,
+	.cuda_funcs = {bzero_variable_cuda, NULL},
 #endif
 	.nbuffers = 1,
 	.model = &bzero_variable_model
@@ -184,9 +184,9 @@ static struct starpu_perfmodel bzero_vector_model = {
 
 struct starpu_codelet bzero_vector_cl = {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = bzero_vector_cpu,
+	.cpu_funcs = {bzero_vector_cpu, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = bzero_vector_cuda,
+	.cuda_funcs = {bzero_vector_cuda, NULL},
 #endif
 	.nbuffers = 1,
 	.model = &bzero_vector_model
@@ -237,9 +237,9 @@ static struct starpu_perfmodel dot_kernel_model = {
 
 static struct starpu_codelet dot_kernel_cl = {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = dot_kernel_cpu,
+	.cpu_funcs = {dot_kernel_cpu, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = dot_kernel_cuda,
+	.cuda_funcs = {dot_kernel_cuda, NULL},
 #endif
 	.nbuffers = 3,
 	.model = &dot_kernel_model
@@ -304,9 +304,9 @@ static struct starpu_perfmodel scal_kernel_model = {
 
 static struct starpu_codelet scal_kernel_cl = {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = scal_kernel_cpu,
+	.cpu_funcs = {scal_kernel_cpu, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = scal_kernel_cuda,
+	.cuda_funcs = {scal_kernel_cuda, NULL},
 #endif
 	.nbuffers = 1,
 	.model = &scal_kernel_model
@@ -377,9 +377,9 @@ static struct starpu_codelet gemv_kernel_cl = {
 	.where = STARPU_CPU|STARPU_CUDA,
 	.type = STARPU_SPMD,
 	.max_parallelism = INT_MAX,
-	.cpu_func = gemv_kernel_cpu,
+	.cpu_funcs = {gemv_kernel_cpu, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = gemv_kernel_cuda,
+	.cuda_funcs = {gemv_kernel_cuda, NULL},
 #endif
 	.nbuffers = 3,
 	.model = &gemv_kernel_model
@@ -467,9 +467,9 @@ static struct starpu_perfmodel scal_axpy_kernel_model = {
 
 static struct starpu_codelet scal_axpy_kernel_cl = {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = scal_axpy_kernel_cpu,
+	.cpu_funcs = {scal_axpy_kernel_cpu, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = scal_axpy_kernel_cuda,
+	.cuda_funcs = {scal_axpy_kernel_cuda, NULL},
 #endif
 	.nbuffers = 2,
 	.model = &scal_axpy_kernel_model
@@ -535,9 +535,9 @@ static struct starpu_perfmodel axpy_kernel_model = {
 
 static struct starpu_codelet axpy_kernel_cl = {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = axpy_kernel_cpu,
+	.cpu_funcs = {axpy_kernel_cpu, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = axpy_kernel_cuda,
+	.cuda_funcs = {axpy_kernel_cuda, NULL},
 #endif
 	.nbuffers = 2,
 	.model = &axpy_kernel_model
@@ -595,9 +595,9 @@ static struct starpu_perfmodel copy_handle_model = {
 
 static struct starpu_codelet copy_handle_cl = {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = copy_handle_cpu,
+	.cpu_funcs = {copy_handle_cpu, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = copy_handle_cuda,
+	.cuda_funcs = {copy_handle_cuda, NULL},
 #endif
 	.nbuffers = 2,
 	.model = &copy_handle_model

+ 17 - 17
examples/cholesky/cholesky_grain_tag.c

@@ -39,9 +39,9 @@ static struct starpu_task *create_task(starpu_tag_t id)
 static struct starpu_codelet cl11 =
 {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = chol_cpu_codelet_update_u11,
+	.cpu_funcs = {chol_cpu_codelet_update_u11, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = chol_cublas_codelet_update_u11,
+	.cuda_funcs = {chol_cublas_codelet_update_u11, NULL},
 #endif
 	.nbuffers = 1,
 	.model = &chol_model_11
@@ -52,7 +52,7 @@ static struct starpu_task * create_task_11(starpu_data_handle_t dataA, unsigned
 /*	FPRINTF(stdout, "task 11 k = %d TAG = %llx\n", k, (TAG11(k))); */
 
 	struct starpu_task *task = create_task(TAG11_AUX(k, reclevel));
-	
+
 	task->cl = &cl11;
 
 	/* which sub-data is manipulated ? */
@@ -73,9 +73,9 @@ static struct starpu_task * create_task_11(starpu_data_handle_t dataA, unsigned
 static struct starpu_codelet cl21 =
 {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = chol_cpu_codelet_update_u21,
+	.cpu_funcs = {chol_cpu_codelet_update_u21, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = chol_cublas_codelet_update_u21,
+	.cuda_funcs = {chol_cublas_codelet_update_u21, NULL},
 #endif
 	.nbuffers = 2,
 	.model = &chol_model_21
@@ -85,12 +85,12 @@ static void create_task_21(starpu_data_handle_t dataA, unsigned k, unsigned j, u
 {
 	struct starpu_task *task = create_task(TAG21_AUX(k, j, reclevel));
 
-	task->cl = &cl21;	
+	task->cl = &cl21;
 
 	/* which sub-data is manipulated ? */
-	task->buffers[0].handle = starpu_data_get_sub_data(dataA, 2, k, k); 
+	task->buffers[0].handle = starpu_data_get_sub_data(dataA, 2, k, k);
 	task->buffers[0].mode = STARPU_R;
-	task->buffers[1].handle = starpu_data_get_sub_data(dataA, 2, k, j); 
+	task->buffers[1].handle = starpu_data_get_sub_data(dataA, 2, k, j);
 	task->buffers[1].mode = STARPU_RW;
 
 	if (j == k+1) {
@@ -111,9 +111,9 @@ static void create_task_21(starpu_data_handle_t dataA, unsigned k, unsigned j, u
 static struct starpu_codelet cl22 =
 {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = chol_cpu_codelet_update_u22,
+	.cpu_funcs = {chol_cpu_codelet_update_u22, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = chol_cublas_codelet_update_u22,
+	.cuda_funcs = {chol_cublas_codelet_update_u22, NULL},
 #endif
 	.nbuffers = 3,
 	.model = &chol_model_22
@@ -128,11 +128,11 @@ static void create_task_22(starpu_data_handle_t dataA, unsigned k, unsigned i, u
 	task->cl = &cl22;
 
 	/* which sub-data is manipulated ? */
-	task->buffers[0].handle = starpu_data_get_sub_data(dataA, 2, k, i); 
+	task->buffers[0].handle = starpu_data_get_sub_data(dataA, 2, k, i);
 	task->buffers[0].mode = STARPU_R;
-	task->buffers[1].handle = starpu_data_get_sub_data(dataA, 2, k, j); 
+	task->buffers[1].handle = starpu_data_get_sub_data(dataA, 2, k, j);
 	task->buffers[1].mode = STARPU_R;
-	task->buffers[2].handle = starpu_data_get_sub_data(dataA, 2, i, j); 
+	task->buffers[2].handle = starpu_data_get_sub_data(dataA, 2, i, j);
 	task->buffers[2].mode = STARPU_RW;
 
 	if ( (i == k + 1) && (j == k +1) ) {
@@ -153,7 +153,7 @@ static void create_task_22(starpu_data_handle_t dataA, unsigned k, unsigned i, u
 
 
 /*
- *	code to bootstrap the factorization 
+ *	code to bootstrap the factorization
  *	and construct the DAG
  */
 
@@ -195,7 +195,7 @@ static void cholesky_grain_rec(float *matA, unsigned size, unsigned ld, unsigned
 		else {
 			starpu_task_submit(task);
 		}
-		
+
 		for (j = k+1; j<nblocks; j++)
 		{
 			create_task_21(dataA, k, j, reclevel);
@@ -260,7 +260,7 @@ static void initialize_system(float **A, unsigned dim, unsigned pinned)
 	if (pinned)
 	{
 		starpu_malloc((void **)A, dim*dim*sizeof(float));
-	} 
+	}
 	else {
 		*A = malloc(dim*dim*sizeof(float));
 	}
@@ -357,7 +357,7 @@ int main(int argc, char **argv)
 	float *test_mat = malloc(size*size*sizeof(float));
 	STARPU_ASSERT(test_mat);
 
-	SSYRK("L", "N", size, size, 1.0f, 
+	SSYRK("L", "N", size, size, 1.0f,
 				mat, size, 0.0f, test_mat, size);
 
 	FPRINTF(stderr, "comparing results ...\n");

+ 6 - 6
examples/cholesky/cholesky_implicit.c

@@ -26,9 +26,9 @@ static struct starpu_codelet cl11 =
 {
 	.where = STARPU_CPU|STARPU_CUDA,
 	.type = STARPU_SEQ,
-	.cpu_func = chol_cpu_codelet_update_u11,
+	.cpu_funcs = {chol_cpu_codelet_update_u11, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = chol_cublas_codelet_update_u11,
+	.cuda_funcs = {chol_cublas_codelet_update_u11, NULL},
 #endif
 	.nbuffers = 1,
 	.model = &chol_model_11
@@ -38,9 +38,9 @@ static struct starpu_codelet cl21 =
 {
 	.where = STARPU_CPU|STARPU_CUDA,
 	.type = STARPU_SEQ,
-	.cpu_func = chol_cpu_codelet_update_u21,
+	.cpu_funcs = {chol_cpu_codelet_update_u21, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = chol_cublas_codelet_update_u21,
+	.cuda_funcs = {chol_cublas_codelet_update_u21, NULL},
 #endif
 	.nbuffers = 2,
 	.model = &chol_model_21
@@ -51,9 +51,9 @@ static struct starpu_codelet cl22 =
 	.where = STARPU_CPU|STARPU_CUDA,
 	.type = STARPU_SEQ,
 	.max_parallelism = INT_MAX,
-	.cpu_func = chol_cpu_codelet_update_u22,
+	.cpu_funcs = {chol_cpu_codelet_update_u22, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = chol_cublas_codelet_update_u22,
+	.cuda_funcs = {chol_cublas_codelet_update_u22, NULL},
 #endif
 	.nbuffers = 3,
 	.model = &chol_model_22

+ 6 - 6
examples/cholesky/cholesky_tag.c

@@ -39,9 +39,9 @@ static struct starpu_task *create_task(starpu_tag_t id)
 static struct starpu_codelet cl11 =
 {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = chol_cpu_codelet_update_u11,
+	.cpu_funcs = {chol_cpu_codelet_update_u11, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = chol_cublas_codelet_update_u11,
+	.cuda_funcs = {chol_cublas_codelet_update_u11, NULL},
 #endif
 	.nbuffers = 1,
 	.model = &chol_model_11
@@ -74,9 +74,9 @@ static struct starpu_task * create_task_11(starpu_data_handle_t dataA, unsigned
 static struct starpu_codelet cl21 =
 {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = chol_cpu_codelet_update_u21,
+	.cpu_funcs = {chol_cpu_codelet_update_u21, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = chol_cublas_codelet_update_u21,
+	.cuda_funcs = {chol_cublas_codelet_update_u21, NULL},
 #endif
 	.nbuffers = 2,
 	.model = &chol_model_21
@@ -117,9 +117,9 @@ static void create_task_21(starpu_data_handle_t dataA, unsigned k, unsigned j)
 static struct starpu_codelet cl22 =
 {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = chol_cpu_codelet_update_u22,
+	.cpu_funcs = {chol_cpu_codelet_update_u22, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = chol_cublas_codelet_update_u22,
+	.cuda_funcs = {chol_cublas_codelet_update_u22, NULL},
 #endif
 	.nbuffers = 3,
 	.model = &chol_model_22

+ 6 - 6
examples/cholesky/cholesky_tile_tag.c

@@ -42,9 +42,9 @@ static struct starpu_task *create_task(starpu_tag_t id)
 static struct starpu_codelet cl11 =
 {
 	.where = STARPU_CPU|STARPU_CUDA|STARPU_GORDON,
-	.cpu_func = chol_cpu_codelet_update_u11,
+	.cpu_funcs = {chol_cpu_codelet_update_u11, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = chol_cublas_codelet_update_u11,
+	.cuda_funcs = {chol_cublas_codelet_update_u11, NULL},
 #endif
 #ifdef STARPU_USE_GORDON
 #ifdef SPU_FUNC_POTRF
@@ -83,9 +83,9 @@ static struct starpu_task * create_task_11(unsigned k, unsigned nblocks)
 static struct starpu_codelet cl21 =
 {
 	.where = STARPU_CPU|STARPU_CUDA|STARPU_GORDON,
-	.cpu_func = chol_cpu_codelet_update_u21,
+	.cpu_funcs = {chol_cpu_codelet_update_u21, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = chol_cublas_codelet_update_u21,
+	.cuda_funcs = {chol_cublas_codelet_update_u21, NULL},
 #endif
 #ifdef STARPU_USE_GORDON
 #ifdef SPU_FUNC_STRSM
@@ -128,9 +128,9 @@ static void create_task_21(unsigned k, unsigned j)
 static struct starpu_codelet cl22 =
 {
 	.where = STARPU_CPU|STARPU_CUDA|STARPU_GORDON,
-	.cpu_func = chol_cpu_codelet_update_u22,
+	.cpu_funcs = {chol_cpu_codelet_update_u22, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = chol_cublas_codelet_update_u22,
+	.cuda_funcs = {chol_cublas_codelet_update_u22, NULL},
 #endif
 #ifdef STARPU_USE_GORDON
 #ifdef SPU_FUNC_SGEMM

+ 3 - 3
examples/filters/fblock.c

@@ -86,12 +86,12 @@ int main(int argc, char **argv)
 	struct starpu_codelet cl =
 	{
                 .where = STARPU_CPU|STARPU_CUDA|STARPU_OPENCL,
-                .cpu_func = cpu_func,
+                .cpu_funcs = {cpu_func, NULL},
 #ifdef STARPU_USE_CUDA
-                .cuda_func = cuda_func,
+                .cuda_funcs = {cuda_func, NULL},
 #endif
 #ifdef STARPU_USE_OPENCL
-                .opencl_func = opencl_func,
+                .opencl_funcs = {opencl_func, NULL},
 #endif
 		.nbuffers = 1
 	};

+ 1 - 1
examples/filters/fmatrix.c

@@ -58,7 +58,7 @@ int main(int argc, char **argv)
         starpu_data_handle_t handle;
         struct starpu_codelet cl = {
                 .where = STARPU_CPU,
-                .cpu_func = cpu_func,
+                .cpu_funcs = {cpu_func, NULL},
                 .nbuffers = 1
         };
         starpu_init(NULL);

+ 1 - 1
examples/filters/fvector.c

@@ -44,7 +44,7 @@ int main(int argc, char **argv)
 
         struct starpu_codelet cl = {
                 .where = STARPU_CPU,
-                .cpu_func = cpu_func,
+                .cpu_funcs = {cpu_func, NULL},
                 .nbuffers = 1
         };
 

+ 8 - 8
examples/heat/dw_factolu.c

@@ -35,9 +35,9 @@ static unsigned no_prio = 0;
 static struct starpu_codelet cl11 =
 {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = dw_cpu_codelet_update_u11,
+	.cpu_funcs = {dw_cpu_codelet_update_u11, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = dw_cublas_codelet_update_u11,
+	.cuda_funcs = {dw_cublas_codelet_update_u11, NULL},
 #endif
 	.nbuffers = 1,
 	.model = &model_11
@@ -46,9 +46,9 @@ static struct starpu_codelet cl11 =
 static struct starpu_codelet cl12 =
 {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = dw_cpu_codelet_update_u12,
+	.cpu_funcs = {dw_cpu_codelet_update_u12, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = dw_cublas_codelet_update_u12,
+	.cuda_funcs = {dw_cublas_codelet_update_u12, NULL},
 #endif
 	.nbuffers = 2,
 	.model = &model_12
@@ -57,9 +57,9 @@ static struct starpu_codelet cl12 =
 static struct starpu_codelet cl21 =
 {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = dw_cpu_codelet_update_u21,
+	.cpu_funcs = {dw_cpu_codelet_update_u21, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = dw_cublas_codelet_update_u21,
+	.cuda_funcs = {dw_cublas_codelet_update_u21, NULL},
 #endif
 	.nbuffers = 2,
 	.model = &model_21
@@ -68,9 +68,9 @@ static struct starpu_codelet cl21 =
 static struct starpu_codelet cl22 =
 {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = dw_cpu_codelet_update_u22,
+	.cpu_funcs = {dw_cpu_codelet_update_u22, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = dw_cublas_codelet_update_u22,
+	.cuda_funcs = {dw_cublas_codelet_update_u22, NULL},
 #endif
 	.nbuffers = 3,
 	.model = &model_22

+ 8 - 8
examples/heat/dw_factolu_grain.c

@@ -44,9 +44,9 @@ static struct starpu_task *create_task(starpu_tag_t id)
 
 static struct starpu_codelet cl11 = {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = dw_cpu_codelet_update_u11,
+	.cpu_funcs = {dw_cpu_codelet_update_u11, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = dw_cublas_codelet_update_u11,
+	.cuda_funcs = {dw_cublas_codelet_update_u11, NULL},
 #endif
 	.nbuffers = 1,
 	.model = &model_11
@@ -77,9 +77,9 @@ static struct starpu_task *create_task_11(starpu_data_handle_t dataA, unsigned k
 
 static struct starpu_codelet cl12 = {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = dw_cpu_codelet_update_u12,
+	.cpu_funcs = {dw_cpu_codelet_update_u12, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = dw_cublas_codelet_update_u12,
+	.cuda_funcs = {dw_cublas_codelet_update_u12, NULL},
 #endif
 	.nbuffers = 2,
 	.model = &model_12
@@ -116,9 +116,9 @@ static void create_task_12(starpu_data_handle_t dataA, unsigned k, unsigned i, u
 
 static struct starpu_codelet cl21 = {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = dw_cpu_codelet_update_u21,
+	.cpu_funcs = {dw_cpu_codelet_update_u21, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = dw_cublas_codelet_update_u21,
+	.cuda_funcs = {dw_cublas_codelet_update_u21, NULL},
 #endif
 	.nbuffers = 2,
 	.model = &model_21
@@ -153,9 +153,9 @@ static void create_task_21(starpu_data_handle_t dataA, unsigned k, unsigned j, u
 
 static struct starpu_codelet cl22 = {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = dw_cpu_codelet_update_u22,
+	.cpu_funcs = {dw_cpu_codelet_update_u22, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = dw_cublas_codelet_update_u22,
+	.cuda_funcs = {dw_cublas_codelet_update_u22, NULL},
 #endif
 	.nbuffers = 3,
 	.model = &model_22

+ 8 - 8
examples/heat/dw_factolu_tag.c

@@ -46,9 +46,9 @@ static struct starpu_task *create_task(starpu_tag_t id)
 
 static struct starpu_codelet cl11 = {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = dw_cpu_codelet_update_u11,
+	.cpu_funcs = {dw_cpu_codelet_update_u11, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = dw_cublas_codelet_update_u11,
+	.cuda_funcs = {dw_cublas_codelet_update_u11, NULL},
 #endif
 	.nbuffers = 1,
 	.model = &model_11
@@ -80,9 +80,9 @@ static struct starpu_task *create_task_11(starpu_data_handle_t dataA, unsigned k
 
 static struct starpu_codelet cl12 = {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = dw_cpu_codelet_update_u12,
+	.cpu_funcs = {dw_cpu_codelet_update_u12, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = dw_cublas_codelet_update_u12,
+	.cuda_funcs = {dw_cublas_codelet_update_u12, NULL},
 #endif
 	.nbuffers = 2,
 	.model = &model_12
@@ -119,9 +119,9 @@ static void create_task_12(starpu_data_handle_t dataA, unsigned k, unsigned i)
 
 static struct starpu_codelet cl21 = {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = dw_cpu_codelet_update_u21,
+	.cpu_funcs = {dw_cpu_codelet_update_u21, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = dw_cublas_codelet_update_u21,
+	.cuda_funcs = {dw_cublas_codelet_update_u21, NULL},
 #endif
 	.nbuffers = 2,
 	.model = &model_21
@@ -156,9 +156,9 @@ static void create_task_21(starpu_data_handle_t dataA, unsigned k, unsigned j)
 
 static struct starpu_codelet cl22 = {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = dw_cpu_codelet_update_u22,
+	.cpu_funcs = {dw_cpu_codelet_update_u22, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = dw_cublas_codelet_update_u22,
+	.cuda_funcs = {dw_cublas_codelet_update_u22, NULL},
 #endif
 	.nbuffers = 3,
 	.model = &model_22

+ 15 - 15
examples/heat/dw_sparse_cg.c

@@ -135,7 +135,7 @@ 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_func = cpu_codelet_func_1;
+	task1->cl->cpu_funcs[0] = cpu_codelet_func_1;
 	task1->cl->nbuffers = 4;
 		task1->buffers[0].handle = problem->ds_matrixA;
 		task1->buffers[0].mode = STARPU_R;
@@ -149,7 +149,7 @@ void init_cg(struct cg_problem *problem)
 	/* d = r */
 	struct starpu_task *task2 = create_task(2UL);
 	task2->cl->where = STARPU_CPU;
-	task2->cl->cpu_func = cpu_codelet_func_2;
+	task2->cl->cpu_funcs[0] = cpu_codelet_func_2;
 	task2->cl->nbuffers = 2;
 		task2->buffers[0].handle = problem->ds_vecd;
 		task2->buffers[0].mode = STARPU_W;
@@ -162,9 +162,9 @@ void init_cg(struct cg_problem *problem)
 	struct starpu_task *task3 = create_task(3UL);
 	task3->cl->where = STARPU_CUDA|STARPU_CPU;
 #ifdef STARPU_USE_CUDA
-	task3->cl->cuda_func = cublas_codelet_func_3;
+	task3->cl->cuda_funcs[0] = cublas_codelet_func_3;
 #endif
-	task3->cl->cpu_func = cpu_codelet_func_3;
+	task3->cl->cpu_funcs[0] = cpu_codelet_func_3;
 	task3->cl_arg = problem;
 	task3->cl->nbuffers = 1;
 		task3->buffers[0].handle = problem->ds_vecr;
@@ -196,7 +196,7 @@ 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_func = cpu_codelet_func_4;
+	task4->cl->cpu_funcs[0] = cpu_codelet_func_4;
 	task4->cl->nbuffers = 3;
 		task4->buffers[0].handle = problem->ds_matrixA;
 		task4->buffers[0].mode = STARPU_R;
@@ -209,9 +209,9 @@ void launch_new_cg_iteration(struct cg_problem *problem)
 	struct starpu_task *task5 = create_task(maskiter | 5UL);
 	task5->cl->where = STARPU_CUDA|STARPU_CPU;
 #ifdef STARPU_USE_CUDA
-	task5->cl->cuda_func = cublas_codelet_func_5;
+	task5->cl->cuda_funcs[0] = cublas_codelet_func_5;
 #endif
-	task5->cl->cpu_func = cpu_codelet_func_5;
+	task5->cl->cpu_funcs[0] = cpu_codelet_func_5;
 	task5->cl_arg = problem;
 	task5->cl->nbuffers = 2;
 		task5->buffers[0].handle = problem->ds_vecd;
@@ -225,9 +225,9 @@ void launch_new_cg_iteration(struct cg_problem *problem)
 	struct starpu_task *task6 = create_task(maskiter | 6UL);
 	task6->cl->where = STARPU_CUDA|STARPU_CPU;
 #ifdef STARPU_USE_CUDA
-	task6->cl->cuda_func = cublas_codelet_func_6;
+	task6->cl->cuda_funcs[0] = cublas_codelet_func_6;
 #endif
-	task6->cl->cpu_func = cpu_codelet_func_6;
+	task6->cl->cpu_funcs[0] = cpu_codelet_func_6;
 	task6->cl_arg = problem;
 	task6->cl->nbuffers = 2;
 		task6->buffers[0].handle = problem->ds_vecx;
@@ -241,9 +241,9 @@ void launch_new_cg_iteration(struct cg_problem *problem)
 	struct starpu_task *task7 = create_task(maskiter | 7UL);
 	task7->cl->where = STARPU_CUDA|STARPU_CPU;
 #ifdef STARPU_USE_CUDA
-	task7->cl->cuda_func = cublas_codelet_func_7;
+	task7->cl->cuda_funcs[0] = cublas_codelet_func_7;
 #endif
-	task7->cl->cpu_func = cpu_codelet_func_7;
+	task7->cl->cpu_funcs[0] = cpu_codelet_func_7;
 	task7->cl_arg = problem;
 	task7->cl->nbuffers = 2;
 		task7->buffers[0].handle = problem->ds_vecr;
@@ -257,9 +257,9 @@ void launch_new_cg_iteration(struct cg_problem *problem)
 	struct starpu_task *task8 = create_task(maskiter | 8UL);
 	task8->cl->where = STARPU_CUDA|STARPU_CPU;
 #ifdef STARPU_USE_CUDA
-	task8->cl->cuda_func = cublas_codelet_func_8;
+	task8->cl->cuda_funcs[0] = cublas_codelet_func_8;
 #endif
-	task8->cl->cpu_func = cpu_codelet_func_8;
+	task8->cl->cpu_funcs[0] = cpu_codelet_func_8;
 	task8->cl_arg = problem;
 	task8->cl->nbuffers = 1;
 		task8->buffers[0].handle = problem->ds_vecr;
@@ -271,9 +271,9 @@ void launch_new_cg_iteration(struct cg_problem *problem)
 	struct starpu_task *task9 = create_task(maskiter | 9UL);
 	task9->cl->where = STARPU_CUDA|STARPU_CPU;
 #ifdef STARPU_USE_CUDA
-	task9->cl->cuda_func = cublas_codelet_func_9;
+	task9->cl->cuda_funcs[0] = cublas_codelet_func_9;
 #endif
-	task9->cl->cpu_func = cpu_codelet_func_9;
+	task9->cl->cpu_funcs[0] = cpu_codelet_func_9;
 	task9->cl_arg = problem;
 	task9->cl->nbuffers = 2;
 		task9->buffers[0].handle = problem->ds_vecd;

+ 3 - 3
examples/incrementer/incrementer.c

@@ -64,12 +64,12 @@ int main(int argc, char **argv)
 	struct starpu_codelet cl =
 	{
 		.where = STARPU_CPU|STARPU_CUDA|STARPU_OPENCL,
-		.cpu_func = cpu_codelet,
+		.cpu_funcs = {cpu_codelet, NULL},
 #ifdef STARPU_USE_CUDA
-		.cuda_func = cuda_codelet,
+		.cuda_funcs = {cuda_codelet, NULL},
 #endif
 #ifdef STARPU_USE_OPENCL
-		.opencl_func = opencl_codelet,
+		.opencl_funcs = {opencl_codelet, NULL},
 #endif
 		.nbuffers = 1
 	};

+ 13 - 13
examples/lu/xlu_kernels.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010-2011  Université de Bordeaux 1
- * Copyright (C) 2010  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
  *
  * 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
@@ -105,9 +105,9 @@ static struct starpu_perfmodel STARPU_LU(model_22) = {
 
 struct starpu_codelet cl22 = {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = STARPU_LU(cpu_u22),
+	.cpu_funcs = {STARPU_LU(cpu_u22), NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = STARPU_LU(cublas_u22),
+	.cuda_funcs = {STARPU_LU(cublas_u22), NULL},
 #endif
 	.nbuffers = 3,
 	.model = &STARPU_LU(model_22)
@@ -188,9 +188,9 @@ static struct starpu_perfmodel STARPU_LU(model_12) = {
 
 struct starpu_codelet cl12 = {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = STARPU_LU(cpu_u12),
+	.cpu_funcs = {STARPU_LU(cpu_u12), NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = STARPU_LU(cublas_u12),
+	.cuda_funcs = {STARPU_LU(cublas_u12), NULL},
 #endif
 	.nbuffers = 2,
 	.model = &STARPU_LU(model_12)
@@ -268,9 +268,9 @@ static struct starpu_perfmodel STARPU_LU(model_21) = {
 
 struct starpu_codelet cl21 = {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = STARPU_LU(cpu_u21),
+	.cpu_funcs = {STARPU_LU(cpu_u21), NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = STARPU_LU(cublas_u21),
+	.cuda_funcs = {STARPU_LU(cublas_u21), NULL},
 #endif
 	.nbuffers = 2,
 	.model = &STARPU_LU(model_21)
@@ -363,9 +363,9 @@ static struct starpu_perfmodel STARPU_LU(model_11) = {
 
 struct starpu_codelet cl11 = {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = STARPU_LU(cpu_u11),
+	.cpu_funcs = {STARPU_LU(cpu_u11), NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = STARPU_LU(cublas_u11),
+	.cuda_funcs = {STARPU_LU(cublas_u11), NULL},
 #endif
 	.nbuffers = 1,
 	.model = &STARPU_LU(model_11)
@@ -499,9 +499,9 @@ static struct starpu_perfmodel STARPU_LU(model_11_pivot) = {
 
 struct starpu_codelet cl11_pivot = {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = STARPU_LU(cpu_u11_pivot),
+	.cpu_funcs = {STARPU_LU(cpu_u11_pivot), NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = STARPU_LU(cublas_u11_pivot),
+	.cuda_funcs = {STARPU_LU(cublas_u11_pivot), NULL},
 #endif
 	.nbuffers = 1,
 	.model = &STARPU_LU(model_11_pivot)
@@ -584,9 +584,9 @@ static struct starpu_perfmodel STARPU_LU(model_pivot) = {
 
 struct starpu_codelet cl_pivot = {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = STARPU_LU(cpu_pivot),
+	.cpu_funcs = {STARPU_LU(cpu_pivot), NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = STARPU_LU(cublas_pivot),
+	.cuda_funcs = {STARPU_LU(cublas_pivot), NULL},
 #endif
 	.nbuffers = 1,
 	.model = &STARPU_LU(model_pivot)

+ 4 - 4
examples/mandelbrot/mandelbrot.c

@@ -375,9 +375,9 @@ static struct starpu_codelet spmd_mandelbrot_cl = {
 	.where = STARPU_CPU|STARPU_OPENCL,
 	.type = STARPU_SPMD,
 	.max_parallelism = INT_MAX,
-	.cpu_func = compute_block_spmd,
+	.cpu_funcs = {compute_block_spmd, NULL},
 #ifdef STARPU_USE_OPENCL
-	.opencl_func = compute_block_opencl,
+	.opencl_funcs = {compute_block_opencl, NULL},
 #endif
 	.nbuffers = 1
 };
@@ -385,9 +385,9 @@ static struct starpu_codelet spmd_mandelbrot_cl = {
 static struct starpu_codelet mandelbrot_cl = {
 	.where = STARPU_CPU|STARPU_OPENCL,
 	.type = STARPU_SEQ,
-	.cpu_func = compute_block,
+	.cpu_funcs = {compute_block, NULL},
 #ifdef STARPU_USE_OPENCL
-	.opencl_func = compute_block_opencl,
+	.opencl_funcs = {compute_block_opencl, NULL},
 #endif
 	.nbuffers = 1
 };

+ 1 - 1
examples/matvecmult/matvecmult.c

@@ -170,7 +170,7 @@ int main(int argc, char **argv)
 
 	cl.where = STARPU_OPENCL;
 #ifdef STARPU_USE_OPENCL
-        cl.opencl_func = opencl_codelet;
+        cl.opencl_funcs[0] = opencl_codelet;
 #endif
         cl.nbuffers = 3;
         cl.model = NULL;

+ 2 - 2
examples/mult/xgemm.c

@@ -185,9 +185,9 @@ static struct starpu_codelet cl = {
 	.where = STARPU_CPU|STARPU_CUDA,
 	.type = STARPU_SEQ, /* changed to STARPU_SPMD if -spmd is passed */
 	.max_parallelism = INT_MAX,
-	.cpu_func = cpu_mult,
+	.cpu_funcs = {cpu_mult, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = cublas_mult,
+	.cuda_funcs = {cublas_mult, NULL},
 #endif
 	.nbuffers = 3,
 	.model = &starpu_gemm_model

+ 1 - 1
examples/openmp/vector_scal.c

@@ -51,7 +51,7 @@ static struct starpu_codelet cl = {
 	.where = STARPU_CPU,
 	.type = STARPU_FORKJOIN,
 	.max_parallelism = INT_MAX,
-	.cpu_func = scal_cpu_func,
+	.cpu_funcs = {scal_cpu_func, NULL},
 	.nbuffers = 1,
 	.model = &vector_scal_model,
 };

+ 2 - 2
examples/opt/pi/pi.c

@@ -115,9 +115,9 @@ int main(int argc, char **argv)
 
 	struct starpu_codelet cl = {
 		.where = STARPU_CPU|STARPU_CUDA,
-		.cpu_func = cpu_kernel,
+		.cpu_funcs = {cpu_kernel, NULL},
 #ifdef STARPU_USE_CUDA
-		.cuda_func = cuda_kernel,
+		.cuda_funcs = {cuda_kernel, NULL},
 #endif
 		.nbuffers = 2,
 		.model = &model

+ 6 - 6
examples/opt/pi/pi_redux.c

@@ -189,9 +189,9 @@ static struct starpu_codelet pi_cl = {
 		STARPU_CUDA|
 #endif
 		STARPU_CPU,
-	.cpu_func = pi_func_cpu,
+	.cpu_funcs = {pi_func_cpu, NULL},
 #ifdef STARPU_HAVE_CURAND
-	.cuda_func = pi_func_cuda,
+	.cuda_funcs = {pi_func_cuda, NULL},
 #endif
 	.nbuffers = 2,
 	.model = NULL
@@ -222,9 +222,9 @@ static struct starpu_codelet init_codelet = {
 		STARPU_CUDA|
 #endif
 		STARPU_CPU,
-        .cpu_func = init_cpu_func,
+        .cpu_funcs = {init_cpu_func, NULL},
 #ifdef STARPU_HAVE_CURAND
-        .cuda_func = init_cuda_func,
+        .cuda_funcs = {init_cuda_func, NULL},
 #endif
         .nbuffers = 1
 };
@@ -261,9 +261,9 @@ static struct starpu_codelet redux_codelet = {
 		STARPU_CUDA|
 #endif
 		STARPU_CPU,
-	.cpu_func = redux_cpu_func,
+	.cpu_funcs = {redux_cpu_func, NULL},
 #ifdef STARPU_HAVE_CURAND
-	.cuda_func = redux_cuda_func,
+	.cuda_funcs = {redux_cuda_func, NULL},
 #endif
 	.nbuffers = 2
 };

+ 2 - 2
examples/ppm_downscaler/yuv_downscaler.c

@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2010-2011  Université de Bordeaux 1
  * Copyright (C) 2010  Mehdi Juhoor <mjuhoor@gmail.com>
- * Copyright (C) 2010  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
  *
  * 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
@@ -84,7 +84,7 @@ static void ds_kernel_cpu(void *descr[], __attribute__((unused)) void *arg)
 
 static struct starpu_codelet ds_codelet = {
 	.where = STARPU_CPU,
-	.cpu_func = ds_kernel_cpu,
+	.cpu_funcs = {ds_kernel_cpu, NULL},
 	.nbuffers = 2, /* input -> output */
 	.model = NULL
 };

+ 3 - 3
examples/profiling/profiling.c

@@ -47,9 +47,9 @@ int main(int argc, char **argv)
 	struct starpu_codelet cl =
 	{
 		.where = STARPU_CPU|STARPU_CUDA|STARPU_OPENCL,
-		.cpu_func = sleep_codelet,
-		.cuda_func = sleep_codelet,
-		.opencl_func = sleep_codelet,
+		.cpu_funcs = {sleep_codelet, NULL},
+		.cuda_funcs = {sleep_codelet, NULL},
+		.opencl_funcs = {sleep_codelet, NULL},
 		.nbuffers = 0
 	};
 

+ 6 - 6
examples/reductions/dot_product.c

@@ -76,9 +76,9 @@ void init_cuda_func(void *descr[], void *cl_arg)
 static struct starpu_codelet init_codelet = {
 	.where = STARPU_CPU|STARPU_CUDA,
 	.can_execute = can_execute,
-	.cpu_func = init_cpu_func,
+	.cpu_funcs = {init_cpu_func, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = init_cuda_func,
+	.cuda_funcs = {init_cuda_func, NULL},
 #endif
 	.nbuffers = 1
 };
@@ -102,9 +102,9 @@ extern void redux_cuda_func(void *descr[], void *_args);
 static struct starpu_codelet redux_codelet = {
 	.where = STARPU_CPU|STARPU_CUDA,
 	.can_execute = can_execute,
-	.cpu_func = redux_cpu_func,
+	.cpu_funcs = {redux_cpu_func, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = redux_cuda_func,
+	.cuda_funcs = {redux_cuda_func, NULL},
 #endif
 	.nbuffers = 2
 };
@@ -164,9 +164,9 @@ void dot_cuda_func(void *descr[], void *cl_arg)
 static struct starpu_codelet dot_codelet = {
 	.where = STARPU_CPU|STARPU_CUDA,
 	.can_execute = can_execute,
-	.cpu_func = dot_cpu_func,
+	.cpu_funcs = {dot_cpu_func, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = dot_cuda_func,
+	.cuda_funcs = {dot_cuda_func, NULL},
 #endif
 	.nbuffers = 3
 };

+ 3 - 3
examples/reductions/minmax_reduction.c

@@ -52,7 +52,7 @@ static void minmax_neutral_cpu_func(void *descr[], void *cl_arg)
 
 static struct starpu_codelet minmax_init_codelet = {
 	.where = STARPU_CPU,
-	.cpu_func = minmax_neutral_cpu_func,
+	.cpu_funcs = {minmax_neutral_cpu_func, NULL},
 	.nbuffers = 1
 };
 
@@ -78,7 +78,7 @@ void minmax_redux_cpu_func(void *descr[], void *cl_arg)
 
 static struct starpu_codelet minmax_redux_codelet = {
 	.where = STARPU_CPU,
-	.cpu_func = minmax_redux_cpu_func,
+	.cpu_funcs = {minmax_redux_cpu_func, NULL},
 	.nbuffers = 2
 };
 
@@ -112,7 +112,7 @@ void minmax_cpu_func(void *descr[], void *cl_arg)
 
 static struct starpu_codelet minmax_codelet = {
 	.where = STARPU_CPU,
-	.cpu_func = minmax_cpu_func,
+	.cpu_funcs = {minmax_cpu_func, NULL},
 	.nbuffers = 2
 };
 

+ 3 - 3
examples/scheduler/dummy_sched.c

@@ -108,9 +108,9 @@ static void dummy_func(void *descr[] __attribute__ ((unused)), void *arg __attri
 static struct starpu_codelet dummy_codelet = 
 {
 	.where = STARPU_CPU|STARPU_CUDA|STARPU_OPENCL,
-	.cpu_func = dummy_func,
-	.cuda_func = dummy_func,
-        .opencl_func = dummy_func,
+	.cpu_funcs = {dummy_func, NULL},
+	.cuda_funcs = {dummy_func, NULL},
+        .opencl_funcs = {dummy_func, NULL},
 	.model = NULL,
 	.nbuffers = 0
 };

+ 2 - 2
examples/spmv/dw_block_spmv.c

@@ -143,9 +143,9 @@ unsigned totaltasks;
 
 struct starpu_codelet cl = {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func =  cpu_block_spmv,
+	.cpu_funcs = { cpu_block_spmv, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = cublas_block_spmv,
+	.cuda_funcs = {cublas_block_spmv, NULL},
 #endif
 	.nbuffers = 3
 };

+ 3 - 3
examples/spmv/spmv.c

@@ -89,12 +89,12 @@ static struct starpu_data_filter vector_f = {
 
 static struct starpu_codelet spmv_cl = {
 	.where = STARPU_CPU|STARPU_CUDA|STARPU_OPENCL,
-	.cpu_func = spmv_kernel_cpu,
+	.cpu_funcs = {spmv_kernel_cpu, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = spmv_kernel_cuda,
+	.cuda_funcs = {spmv_kernel_cuda, NULL},
 #endif
 #ifdef STARPU_USE_OPENCL
-        .opencl_func = spmv_kernel_opencl,
+        .opencl_funcs = {spmv_kernel_opencl, NULL},
 #endif
 	.nbuffers = 3,
 	.model = NULL

+ 11 - 11
examples/starpufft/starpufftx1d.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009-2011  Université de Bordeaux 1
- * Copyright (C) 2010  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
  *
  * 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
@@ -326,9 +326,9 @@ static struct starpu_codelet STARPUFFT(twist1_1d_codelet) = {
 #endif
 		STARPU_CPU,
 #ifdef STARPU_USE_CUDA
-	.cuda_func = STARPUFFT(twist1_1d_kernel_gpu),
+	.cuda_funcs = {STARPUFFT(twist1_1d_kernel_gpu), NULL},
 #endif
-	.cpu_func = STARPUFFT(twist1_1d_kernel_cpu),
+	.cpu_funcs = {STARPUFFT(twist1_1d_kernel_cpu), NULL},
 	.model = &STARPUFFT(twist1_1d_model),
 	.nbuffers = 2
 };
@@ -343,10 +343,10 @@ static struct starpu_codelet STARPUFFT(fft1_1d_codelet) = {
 #endif
 		0,
 #ifdef STARPU_USE_CUDA
-	.cuda_func = STARPUFFT(fft1_1d_kernel_gpu),
+	.cuda_funcs = {STARPUFFT(fft1_1d_kernel_gpu), NULL},
 #endif
 #ifdef STARPU_HAVE_FFTW
-	.cpu_func = STARPUFFT(fft1_1d_kernel_cpu),
+	.cpu_funcs = {STARPUFFT(fft1_1d_kernel_cpu), NULL},
 #endif
 	.model = &STARPUFFT(fft1_1d_model),
 	.nbuffers = 3
@@ -354,7 +354,7 @@ static struct starpu_codelet STARPUFFT(fft1_1d_codelet) = {
 
 static struct starpu_codelet STARPUFFT(twist2_1d_codelet) = {
 	.where = STARPU_CPU,
-	.cpu_func = STARPUFFT(twist2_1d_kernel_cpu),
+	.cpu_funcs = {STARPUFFT(twist2_1d_kernel_cpu), NULL},
 	.model = &STARPUFFT(twist2_1d_model),
 	.nbuffers = 1
 };
@@ -369,10 +369,10 @@ static struct starpu_codelet STARPUFFT(fft2_1d_codelet) = {
 #endif
 		0,
 #ifdef STARPU_USE_CUDA
-	.cuda_func = STARPUFFT(fft2_1d_kernel_gpu),
+	.cuda_funcs = {STARPUFFT(fft2_1d_kernel_gpu), NULL},
 #endif
 #ifdef STARPU_HAVE_FFTW
-	.cpu_func = STARPUFFT(fft2_1d_kernel_cpu),
+	.cpu_funcs = {STARPUFFT(fft2_1d_kernel_cpu), NULL},
 #endif
 	.model = &STARPUFFT(fft2_1d_model),
 	.nbuffers = 2
@@ -380,7 +380,7 @@ static struct starpu_codelet STARPUFFT(fft2_1d_codelet) = {
 
 static struct starpu_codelet STARPUFFT(twist3_1d_codelet) = {
 	.where = STARPU_CPU,
-	.cpu_func = STARPUFFT(twist3_1d_kernel_cpu),
+	.cpu_funcs = {STARPUFFT(twist3_1d_kernel_cpu), NULL},
 	.model = &STARPUFFT(twist3_1d_model),
 	.nbuffers = 1
 };
@@ -459,10 +459,10 @@ static struct starpu_codelet STARPUFFT(fft_1d_codelet) = {
 #endif
 		0,
 #ifdef STARPU_USE_CUDA
-	.cuda_func = STARPUFFT(fft_1d_kernel_gpu),
+	.cuda_funcs = {STARPUFFT(fft_1d_kernel_gpu), NULL},
 #endif
 #ifdef STARPU_HAVE_FFTW
-	.cpu_func = STARPUFFT(fft_1d_kernel_cpu),
+	.cpu_funcs = {STARPUFFT(fft_1d_kernel_cpu), NULL},
 #endif
 	.model = &STARPUFFT(fft_1d_model),
 	.nbuffers = 2

+ 11 - 11
examples/starpufft/starpufftx2d.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009-2011  Université de Bordeaux 1
- * Copyright (C) 2010  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
  *
  * 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
@@ -311,9 +311,9 @@ static struct starpu_codelet STARPUFFT(twist1_2d_codelet) = {
 #endif
 		STARPU_CPU,
 #ifdef STARPU_USE_CUDA
-	.cuda_func = STARPUFFT(twist1_2d_kernel_gpu),
+	.cuda_funcs = {STARPUFFT(twist1_2d_kernel_gpu), NULL},
 #endif
-	.cpu_func = STARPUFFT(twist1_2d_kernel_cpu),
+	.cpu_funcs = {STARPUFFT(twist1_2d_kernel_cpu), NULL},
 	.model = &STARPUFFT(twist1_2d_model),
 	.nbuffers = 2
 };
@@ -328,10 +328,10 @@ static struct starpu_codelet STARPUFFT(fft1_2d_codelet) = {
 #endif
 		0,
 #ifdef STARPU_USE_CUDA
-	.cuda_func = STARPUFFT(fft1_2d_kernel_gpu),
+	.cuda_funcs = {STARPUFFT(fft1_2d_kernel_gpu), NULL},
 #endif
 #ifdef STARPU_HAVE_FFTW
-	.cpu_func = STARPUFFT(fft1_2d_kernel_cpu),
+	.cpu_funcs = {STARPUFFT(fft1_2d_kernel_cpu), NULL},
 #endif
 	.model = &STARPUFFT(fft1_2d_model),
 	.nbuffers = 4
@@ -339,7 +339,7 @@ static struct starpu_codelet STARPUFFT(fft1_2d_codelet) = {
 
 static struct starpu_codelet STARPUFFT(twist2_2d_codelet) = {
 	.where = STARPU_CPU,
-	.cpu_func = STARPUFFT(twist2_2d_kernel_cpu),
+	.cpu_funcs = {STARPUFFT(twist2_2d_kernel_cpu), NULL},
 	.model = &STARPUFFT(twist2_2d_model),
 	.nbuffers = 1
 };
@@ -354,10 +354,10 @@ static struct starpu_codelet STARPUFFT(fft2_2d_codelet) = {
 #endif
 		0,
 #ifdef STARPU_USE_CUDA
-	.cuda_func = STARPUFFT(fft2_2d_kernel_gpu),
+	.cuda_funcs = {STARPUFFT(fft2_2d_kernel_gpu), NULL},
 #endif
 #ifdef STARPU_HAVE_FFTW
-	.cpu_func = STARPUFFT(fft2_2d_kernel_cpu),
+	.cpu_funcs = {STARPUFFT(fft2_2d_kernel_cpu), NULL},
 #endif
 	.model = &STARPUFFT(fft2_2d_model),
 	.nbuffers = 2
@@ -365,7 +365,7 @@ static struct starpu_codelet STARPUFFT(fft2_2d_codelet) = {
 
 static struct starpu_codelet STARPUFFT(twist3_2d_codelet) = {
 	.where = STARPU_CPU,
-	.cpu_func = STARPUFFT(twist3_2d_kernel_cpu),
+	.cpu_funcs = {STARPUFFT(twist3_2d_kernel_cpu), NULL},
 	.model = &STARPUFFT(twist3_2d_model),
 	.nbuffers = 1
 };
@@ -445,10 +445,10 @@ static struct starpu_codelet STARPUFFT(fft_2d_codelet) = {
 #endif
 		0,
 #ifdef STARPU_USE_CUDA
-	.cuda_func = STARPUFFT(fft_2d_kernel_gpu),
+	.cuda_funcs = {STARPUFFT(fft_2d_kernel_gpu), NULL},
 #endif
 #ifdef STARPU_HAVE_FFTW
-	.cpu_func = STARPUFFT(fft_2d_kernel_cpu),
+	.cpu_funcs = {STARPUFFT(fft_2d_kernel_cpu), NULL},
 #endif
 	.model = &STARPUFFT(fft_2d_model),
 	.nbuffers = 2

+ 9 - 9
examples/stencil/stencil-kernels.c

@@ -453,12 +453,12 @@ struct starpu_codelet cl_update = {
                 STARPU_OPENCL|
 #endif
 		STARPU_CPU,
-	.cpu_func = update_func_cpu,
+	.cpu_funcs = {update_func_cpu, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = update_func_cuda,
+	.cuda_funcs = {update_func_cuda, NULL},
 #endif
 #ifdef STARPU_USE_OPENCL
-	.opencl_func = update_func_opencl,
+	.opencl_funcs = {update_func_opencl, NULL},
 #endif
 	.model = &cl_update_model,
 	.nbuffers = 6
@@ -653,12 +653,12 @@ struct starpu_codelet save_cl_bottom = {
 		STARPU_OPENCL|
 #endif
 		STARPU_CPU,
-	.cpu_func = dummy_func_bottom_cpu,
+	.cpu_funcs = {dummy_func_bottom_cpu, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = dummy_func_bottom_cuda,
+	.cuda_funcs = {dummy_func_bottom_cuda, NULL},
 #endif
 #ifdef STARPU_USE_OPENCL
-	.opencl_func = dummy_func_bottom_opencl,
+	.opencl_funcs = {dummy_func_bottom_opencl, NULL},
 #endif
 	.model = &save_cl_bottom_model,
 	.nbuffers = 4
@@ -673,12 +673,12 @@ struct starpu_codelet save_cl_top = {
 		STARPU_OPENCL|
 #endif
 		STARPU_CPU,
-	.cpu_func = dummy_func_top_cpu,
+	.cpu_funcs = {dummy_func_top_cpu, NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = dummy_func_top_cuda,
+	.cuda_funcs = {dummy_func_top_cuda, NULL},
 #endif
 #ifdef STARPU_USE_OPENCL
-	.opencl_func = dummy_func_top_opencl,
+	.opencl_funcs = {dummy_func_top_opencl, NULL},
 #endif
 	.model = &save_cl_top_model,
 	.nbuffers = 4

+ 3 - 3
examples/stencil/stencil-tasks.c

@@ -220,9 +220,9 @@ void create_task_update(unsigned iter, unsigned z, unsigned local_rank)
 static void null_func(void *descr[] __attribute__((unused)), void *arg __attribute__((unused))) { }
 static struct starpu_codelet null = {
 	.where = STARPU_CPU|STARPU_CUDA|STARPU_OPENCL,
-	.cpu_func = null_func,
-	.cuda_func = null_func,
-	.opencl_func = null_func,
+	.cpu_funcs = {null_func, NULL},
+	.cuda_funcs = {null_func, NULL},
+	.opencl_funcs = {null_func, NULL},
 	.nbuffers = 2
 };
 

+ 2 - 2
examples/tag_example/tag_example.c

@@ -195,8 +195,8 @@ int main(int argc __attribute__((unused)) , char **argv __attribute__((unused)))
 	FPRINTF(stderr, "ITER: %u\n", nk);
 
 	cl.where = STARPU_CPU|STARPU_CUDA|STARPU_GORDON;
-	cl.cpu_func = cpu_codelet;
-	cl.cuda_func = cpu_codelet;
+	cl.cpu_funcs[0] = cpu_codelet;
+	cl.cuda_funcs[0] = cpu_codelet;
 #ifdef STARPU_USE_GORDON
 	cl.gordon_func = gordon_null_kernel;
 #endif

+ 2 - 2
examples/tag_example/tag_example2.c

@@ -109,8 +109,8 @@ int main(int argc __attribute__((unused)) , char **argv __attribute__((unused)))
 
 	parse_args(argc, argv);
 
-	cl.cpu_func = cpu_codelet;
-	cl.cuda_func = cpu_codelet;
+	cl.cpu_funcs[0] = cpu_codelet;
+	cl.cuda_funcs[0] = cpu_codelet;
 #ifdef STARPU_USE_GORDON
 	cl.gordon_func = gordon_null_kernel;
 #endif

+ 2 - 2
examples/tag_example/tag_example3.c

@@ -113,8 +113,8 @@ int main(int argc __attribute__((unused)) , char **argv __attribute__((unused)))
 
 	parse_args(argc, argv);
 
-	cl.cpu_func = cpu_codelet;
-	cl.cuda_func = cpu_codelet;
+	cl.cpu_funcs[0] = cpu_codelet;
+	cl.cuda_funcs[0] = cpu_codelet;
 #ifdef STARPU_USE_GORDON
 	cl.gordon_func = gordon_null_kernel;
 #endif

+ 2 - 2
examples/tag_example/tag_restartable.c

@@ -123,8 +123,8 @@ int main(int argc __attribute__((unused)) , char **argv __attribute__((unused)))
 
 	parse_args(argc, argv);
 
-	cl.cpu_func = cpu_codelet;
-	cl.cuda_func = cpu_codelet;
+	cl.cpu_funcs[0] = cpu_codelet;
+	cl.cuda_funcs[0] = cpu_codelet;
 #ifdef STARPU_USE_GORDON
 	cl.gordon_func = gordon_null_kernel;
 #endif

+ 1 - 1
examples/top/hello_world_top.c

@@ -100,7 +100,7 @@ struct starpu_codelet cl =
 	/* this codelet may only be executed on a CPU, and its cpu
  	 * implementation is function "cpu_func" */
 	.where = STARPU_CPU,
-	.cpu_func = cpu_func,
+	.cpu_funcs = {cpu_func, NULL},
 	/* the codelet does not manipulate any data that is managed
 	 * by our DSM */
 	.nbuffers = 0