瀏覽代碼

Replaces ".modes[id] = mode" by ".modes = { ... }" in the tests.

Cyril Roelandt 13 年之前
父節點
當前提交
41214acdab

+ 1 - 2
tests/core/insert_task.c

@@ -31,8 +31,7 @@ void func_cpu(void *descr[], void *_args)
 
 struct starpu_codelet mycodelet =
 {
-	.modes[1] = STARPU_RW,
-	.modes[0] = STARPU_RW,
+	.modes = { STARPU_RW, STARPU_RW },
 	.where = STARPU_CPU,
 	.cpu_funcs = {func_cpu, NULL},
         .nbuffers = 2

+ 1 - 1
tests/core/multiformat_data_release.c

@@ -152,7 +152,7 @@ create_and_submit(int where)
 {
 	static struct starpu_codelet cl =
 	{
-		.modes[0] = STARPU_RW,
+		.modes = { STARPU_RW },
 #ifdef STARPU_USE_CUDA
 		.cuda_funcs   = {cuda_func, NULL},
 #endif

+ 3 - 4
tests/core/multiformat_handle_conversion.c

@@ -150,7 +150,7 @@ create_and_submit_tasks(int where, starpu_data_handle_t handles[])
 	FPRINTF(stderr, "***** Starting Task 1\n");
 	static struct starpu_codelet cl =
 	{
-		.modes[0] = STARPU_RW,
+		.modes = { STARPU_RW },
 #ifdef STARPU_USE_CUDA
 		.cuda_funcs  = {cuda_func, NULL},
 #endif
@@ -170,7 +170,7 @@ create_and_submit_tasks(int where, starpu_data_handle_t handles[])
 	FPRINTF(stderr, "***** Starting Task 2\n");
 	static struct starpu_codelet cl2 =
 	{
-		.modes[0] = STARPU_RW,
+		.modes = { STARPU_RW },
 		.where = STARPU_CPU,
 		.cpu_funcs = {cpu_func, NULL},
 		.nbuffers = 1
@@ -186,8 +186,7 @@ create_and_submit_tasks(int where, starpu_data_handle_t handles[])
 	FPRINTF(stderr, "***** Starting Task 3\n");
 	static struct starpu_codelet cl3 =
 	{
-		.modes[1] = STARPU_RW,
-		.modes[0] = STARPU_RW,
+		.modes = { STARPU_RW, STARPU_RW },
 		.cpu_funcs   = {cpu_func, NULL},
 #ifdef STARPU_USE_CUDA
 		.cuda_funcs   = {cuda_func, NULL},

+ 1 - 1
tests/datawizard/acquire_release.c

@@ -32,7 +32,7 @@ void increment_cpu(void *descr[], __attribute__ ((unused)) void *_args)
 
 static struct starpu_codelet increment_cl =
 {
-        .modes[0] = STARPU_RW,
+	.modes = { STARPU_RW },
         .where = STARPU_CPU|STARPU_CUDA,
 	.cpu_funcs = {increment_cpu, NULL},
 #ifdef STARPU_USE_CUDA

+ 1 - 1
tests/datawizard/acquire_release2.c

@@ -31,7 +31,7 @@ void increment_cpu(void *descr[], __attribute__ ((unused)) void *_args)
 
 static struct starpu_codelet increment_cl =
 {
-        .modes[0] = STARPU_RW,
+	.modes = { STARPU_RW },
         .where = STARPU_CPU|STARPU_CUDA,
 	.cpu_funcs = {increment_cpu, NULL},
 #ifdef STARPU_USE_CUDA

+ 3 - 6
tests/datawizard/data_implicit_deps.c

@@ -36,8 +36,7 @@ static void f(void *descr[], __attribute__ ((unused)) void *_args)
 
 static struct starpu_codelet cl_f =
 {
-	.modes[1] = STARPU_RW,
-	.modes[0] = STARPU_R,
+	.modes = { STARPU_R, STARPU_RW },
 	.where = STARPU_CPU|STARPU_CUDA,
 	.cpu_funcs = {f, NULL},
 	.cuda_funcs = {f, NULL},
@@ -52,8 +51,7 @@ static void g(void *descr[], __attribute__ ((unused)) void *_args)
 
 static struct starpu_codelet cl_g =
 {
-	.modes[1] = STARPU_RW,
-	.modes[0] = STARPU_R,
+	.modes = { STARPU_R, STARPU_RW },
 	.where = STARPU_CPU|STARPU_CUDA,
 	.cpu_funcs = {g, NULL},
 	.cuda_funcs = {g, NULL},
@@ -68,8 +66,7 @@ static void h(void *descr[], __attribute__ ((unused)) void *_args)
 
 static struct starpu_codelet cl_h =
 {
-	.modes[1] = STARPU_RW,
-	.modes[0] = STARPU_R,
+	.modes = { STARPU_R, STARPU_RW },
 	.where = STARPU_CPU|STARPU_CUDA,
 	.cpu_funcs = {h, NULL},
 	.cuda_funcs = {h, NULL},

+ 1 - 2
tests/datawizard/dining_philosophers.c

@@ -30,8 +30,7 @@ static void eat_kernel(void *descr[], void *arg)
 
 static struct starpu_codelet eating_cl =
 {
-	.modes[1] = STARPU_RW,
-	.modes[0] = STARPU_RW,
+	.modes = { STARPU_RW, STARPU_RW },
 	.where = STARPU_CPU|STARPU_CUDA|STARPU_OPENCL,
 	.cuda_funcs = {eat_kernel, NULL},
 	.cpu_funcs = {eat_kernel, NULL},

+ 1 - 2
tests/datawizard/interfaces/multiformat/advanced/same_handle.c

@@ -27,8 +27,7 @@ static int vector[NX]; static starpu_data_handle_t handle;
 
 static struct starpu_codelet cl =
 {
-.modes[1] = STARPU_RW,
-.modes[0] = STARPU_RW,
+	.modes = { STARPU_RW, STARPU_RW },
 #ifdef STARPU_USE_CUDA
 	.cuda_funcs = { cuda_func, NULL },
 #endif

+ 1 - 1
tests/datawizard/mpi_like.c

@@ -57,7 +57,7 @@ static void increment_handle_cpu_kernel(void *descr[], void *cl_arg __attribute_
 
 static struct starpu_codelet increment_handle_cl =
 {
-	.modes[0] = STARPU_RW,
+	.modes = { STARPU_RW },
 	.where = STARPU_CPU|STARPU_CUDA,
 	.cpu_funcs = {increment_handle_cpu_kernel, NULL},
 #ifdef STARPU_USE_CUDA

+ 1 - 1
tests/datawizard/mpi_like_async.c

@@ -72,7 +72,7 @@ static void increment_handle_cpu_kernel(void *descr[], void *cl_arg __attribute_
 
 static struct starpu_codelet increment_handle_cl =
 {
-	.modes[0] = STARPU_RW,
+	.modes = { STARPU_RW },
 	.where = STARPU_CPU|STARPU_CUDA,
 	.cpu_funcs = {increment_handle_cpu_kernel, NULL},
 #ifdef STARPU_USE_CUDA

+ 1 - 1
tests/datawizard/sync_with_data_with_mem.c

@@ -36,7 +36,7 @@ static void dummy_codelet(void *descr[], __attribute__ ((unused)) void *_args)
 
 static struct starpu_codelet cl =
 {
-	.modes[0] = STARPU_RW,
+	.modes = { STARPU_RW },
 	.where = STARPU_CPU|STARPU_CUDA|STARPU_OPENCL,
 	.cpu_funcs = {dummy_codelet, NULL},
 #ifdef STARPU_USE_CUDA

+ 1 - 1
tests/datawizard/sync_with_data_with_mem_non_blocking.c

@@ -37,7 +37,7 @@ static void dummy_codelet(void *descr[], __attribute__ ((unused)) void *_args)
 
 static struct starpu_codelet cl =
 {
-	.modes[0] = STARPU_RW,
+	.modes = { STARPU_RW },
 	.where = STARPU_CPU|STARPU_CUDA|STARPU_OPENCL,
 	.cpu_funcs = {dummy_codelet, NULL},
 #ifdef STARPU_USE_CUDA

+ 1 - 1
tests/datawizard/sync_with_data_with_mem_non_blocking_implicit.c

@@ -37,7 +37,7 @@ static void dummy_codelet(void *descr[], __attribute__ ((unused)) void *_args)
 
 static struct starpu_codelet cl =
 {
-	.modes[0] = STARPU_RW,
+	.modes = { STARPU_RW },
 	.where = STARPU_CPU|STARPU_CUDA|STARPU_OPENCL,
 	.cpu_funcs = {dummy_codelet, NULL},
 #ifdef STARPU_USE_CUDA

+ 1 - 1
tests/datawizard/unpartition.c

@@ -36,7 +36,7 @@ static void dummy_codelet(void *descr[], __attribute__ ((unused)) void *_args)
 
 static struct starpu_codelet cl =
 {
-	.modes[0] = STARPU_RW,
+	.modes = { STARPU_RW },
 	.where = STARPU_CPU|STARPU_CUDA|STARPU_OPENCL,
 	.cpu_funcs = {dummy_codelet, NULL},
 #ifdef STARPU_USE_CUDA

+ 1 - 1
tests/errorcheck/invalid_blocking_calls.c

@@ -40,7 +40,7 @@ static void wrong_func(void *descr[], void *arg)
 
 static struct starpu_codelet wrong_codelet =
 {
-	.modes[0] = STARPU_RW,
+	.modes = { STARPU_RW },
 	.where = STARPU_CPU|STARPU_CUDA|STARPU_OPENCL,
 	.cpu_funcs = {wrong_func, NULL},
 	.cuda_funcs = {wrong_func, NULL},