ソースを参照

mpi: use .xxx_funcs instead of .xxx_func fields for struct starpu_codelet

Nathalie Furmento 13 年 前
コミット
7c57ef1529

+ 7 - 7
mpi/examples/cholesky/mpi_cholesky.c

@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2009-2011  Université de Bordeaux 1
  * Copyright (C) 2010  Mehdi Juhoor <mjuhoor@gmail.com>
- * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012  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
@@ -27,9 +27,9 @@
 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
@@ -38,9 +38,9 @@ static struct starpu_codelet cl11 =
 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
@@ -49,9 +49,9 @@ static struct starpu_codelet cl21 =
 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

+ 7 - 7
mpi/examples/cholesky/mpi_cholesky_distributed.c

@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2009-2011  Université de Bordeaux 1
  * Copyright (C) 2010  Mehdi Juhoor <mjuhoor@gmail.com>
- * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012  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
@@ -27,9 +27,9 @@
 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
@@ -38,9 +38,9 @@ static struct starpu_codelet cl11 =
 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
@@ -49,9 +49,9 @@ static struct starpu_codelet cl21 =
 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

+ 8 - 8
mpi/examples/mpi_lu/pxlu_kernels.c

@@ -109,9 +109,9 @@ static struct starpu_perfmodel STARPU_PLU(model_22) = {
 
 struct starpu_codelet STARPU_PLU(cl22) = {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = STARPU_PLU(cpu_u22),
+	.cpu_funcs = {STARPU_PLU(cpu_u22), NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = STARPU_PLU(cublas_u22),
+	.cuda_funcs = {STARPU_PLU(cublas_u22), NULL},
 #endif
 	.nbuffers = 3,
 	.modes = {STARPU_R, STARPU_R, STARPU_RW},
@@ -217,9 +217,9 @@ static struct starpu_perfmodel STARPU_PLU(model_12) = {
 
 struct starpu_codelet STARPU_PLU(cl12) = {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = STARPU_PLU(cpu_u12),
+	.cpu_funcs = {STARPU_PLU(cpu_u12), NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = STARPU_PLU(cublas_u12),
+	.cuda_funcs = {STARPU_PLU(cublas_u12), NULL},
 #endif
 	.nbuffers = 2,
 	.modes = {STARPU_R, STARPU_RW},
@@ -326,9 +326,9 @@ static struct starpu_perfmodel STARPU_PLU(model_21) = {
 
 struct starpu_codelet STARPU_PLU(cl21) = {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = STARPU_PLU(cpu_u21),
+	.cpu_funcs = {STARPU_PLU(cpu_u21), NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = STARPU_PLU(cublas_u21),
+	.cuda_funcs = {STARPU_PLU(cublas_u21), NULL},
 #endif
 	.nbuffers = 2,
 	.modes = {STARPU_R, STARPU_RW},
@@ -432,9 +432,9 @@ static struct starpu_perfmodel STARPU_PLU(model_11) = {
 
 struct starpu_codelet STARPU_PLU(cl11) = {
 	.where = STARPU_CPU|STARPU_CUDA,
-	.cpu_func = STARPU_PLU(cpu_u11),
+	.cpu_funcs = {STARPU_PLU(cpu_u11), NULL},
 #ifdef STARPU_USE_CUDA
-	.cuda_func = STARPU_PLU(cublas_u11),
+	.cuda_funcs = {STARPU_PLU(cublas_u11), NULL},
 #endif
 	.nbuffers = 1,
 	.modes = {STARPU_RW},

+ 2 - 2
mpi/examples/scatter_gather/mpi_scatter_gather.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2011  Centre National de la Recherche Scientifique
+ * Copyright (C) 2011, 2012  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
@@ -49,7 +49,7 @@ void cpu_codelet(void *descr[], void *_args)
 static struct starpu_codelet cl =
 {
 	.where = STARPU_CPU,
-	.cpu_func = cpu_codelet,
+	.cpu_funcs = {cpu_codelet, NULL},
 	.nbuffers = 1
 };
 

+ 2 - 2
mpi/tests/insert_task.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2011  Centre National de la Recherche Scientifique
+ * Copyright (C) 2011, 2012  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
@@ -30,7 +30,7 @@ void func_cpu(void *descr[], __attribute__ ((unused)) void *_args)
 struct starpu_codelet mycodelet =
 {
 	.where = STARPU_CPU,
-	.cpu_func = func_cpu,
+	.cpu_funcs = {func_cpu, NULL},
         .nbuffers = 2
 };
 

+ 2 - 2
mpi/tests/insert_task_block.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2011  Centre National de la Recherche Scientifique
+ * Copyright (C) 2011, 2012  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
@@ -47,7 +47,7 @@ void func_cpu(void *descr[], __attribute__ ((unused)) void *_args)
 struct starpu_codelet mycodelet =
 {
 	.where = STARPU_CPU,
-	.cpu_func = func_cpu,
+	.cpu_funcs = {func_cpu, NULL},
         .nbuffers = 1
 };
 

+ 2 - 2
mpi/tests/insert_task_cache.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2011  Centre National de la Recherche Scientifique
+ * Copyright (C) 2011, 2012  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
@@ -30,7 +30,7 @@ void func_cpu(void *descr[], __attribute__ ((unused)) void *_args)
 struct starpu_codelet mycodelet =
 {
 	.where = STARPU_CPU,
-	.cpu_func = func_cpu,
+	.cpu_funcs = {func_cpu, NULL},
         .nbuffers = 2
 };
 

+ 4 - 4
mpi/tests/insert_task_owner.c

@@ -30,28 +30,28 @@ void func_cpu(void *descr[], __attribute__ ((unused)) void *_args)
 struct starpu_codelet mycodelet_r_w =
 {
 	.where = STARPU_CPU,
-	.cpu_func = func_cpu,
+	.cpu_funcs = {func_cpu, NULL},
         .nbuffers = 2
 };
 
 struct starpu_codelet mycodelet_rw_r =
 {
 	.where = STARPU_CPU,
-	.cpu_func = func_cpu,
+	.cpu_funcs = {func_cpu, NULL},
         .nbuffers = 2
 };
 
 struct starpu_codelet mycodelet_rw_rw =
 {
 	.where = STARPU_CPU,
-	.cpu_func = func_cpu,
+	.cpu_funcs = {func_cpu, NULL},
         .nbuffers = 2
 };
 
 struct starpu_codelet mycodelet_w_r =
 {
 	.where = STARPU_CPU,
-	.cpu_func = func_cpu,
+	.cpu_funcs = {func_cpu, NULL},
         .nbuffers = 2
 };
 

+ 2 - 2
mpi/tests/insert_task_owner2.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2011  Centre National de la Recherche Scientifique
+ * Copyright (C) 2011, 2012  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
@@ -42,7 +42,7 @@ void func_cpu(void *descr[], __attribute__ ((unused)) void *_args)
 struct starpu_codelet mycodelet =
 {
 	.where = STARPU_CPU,
-	.cpu_func = func_cpu,
+	.cpu_funcs = {func_cpu, NULL},
         .nbuffers = 4
 };
 

+ 2 - 2
mpi/tests/insert_task_owner_data.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2011  Centre National de la Recherche Scientifique
+ * Copyright (C) 2011, 2012  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
@@ -31,7 +31,7 @@ void func_cpu(void *descr[], __attribute__ ((unused)) void *_args)
 struct starpu_codelet mycodelet =
 {
 	.where = STARPU_CPU,
-	.cpu_func = func_cpu,
+	.cpu_funcs = {func_cpu, NULL},
         .nbuffers = 2
 };
 

+ 2 - 2
mpi/tests/ring.c

@@ -37,9 +37,9 @@ static struct starpu_codelet increment_cl =
 {
 	.where = STARPU_CPU|STARPU_CUDA,
 #ifdef STARPU_USE_CUDA
-	.cuda_func = increment_cuda,
+	.cuda_funcs = {increment_cuda, NULL},
 #endif
-	.cpu_func = increment_cpu,
+	.cpu_funcs = {increment_cpu, NULL},
 	.nbuffers = 1,
 	.modes = {STARPU_RW}
 };

+ 2 - 2
mpi/tests/ring_async.c

@@ -37,9 +37,9 @@ static struct starpu_codelet increment_cl =
 {
 	.where = STARPU_CPU|STARPU_CUDA,
 #ifdef STARPU_USE_CUDA
-	.cuda_func = increment_cuda,
+	.cuda_funcs = {increment_cuda, NULL},
 #endif
-	.cpu_func = increment_cpu,
+	.cpu_funcs = {increment_cpu, NULL},
 	.nbuffers = 1,
 	.modes = {STARPU_RW}
 };

+ 2 - 2
mpi/tests/ring_async_implicit.c

@@ -37,9 +37,9 @@ static struct starpu_codelet increment_cl =
 {
 	.where = STARPU_CPU|STARPU_CUDA,
 #ifdef STARPU_USE_CUDA
-	.cuda_func = increment_cuda,
+	.cuda_funcs = {increment_cuda, NULL},
 #endif
-	.cpu_func = increment_cpu,
+	.cpu_funcs = {increment_cpu, NULL},
 	.nbuffers = 1,
 	.modes = {STARPU_RW}
 };