Selaa lähdekoodia

src: type enum starpu_access_mode has now a named constant for 0

Nathalie Furmento 13 vuotta sitten
vanhempi
commit
d545670a29

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

@@ -454,7 +454,7 @@ static struct starpu_perfmodel cl_update_model =
 
 struct starpu_codelet cl_update =
 {
-	.where = 0 |
+	.where = STARPU_NONE |
 #ifdef STARPU_USE_CUDA
 		STARPU_CUDA|
 #endif
@@ -658,7 +658,7 @@ static struct starpu_perfmodel save_cl_top_model =
 
 struct starpu_codelet save_cl_bottom =
 {
-	.where = 0 |
+	.where = STARPU_NONE |
 #ifdef STARPU_USE_CUDA
 		STARPU_CUDA|
 #endif
@@ -680,7 +680,7 @@ struct starpu_codelet save_cl_bottom =
 
 struct starpu_codelet save_cl_top =
 {
-	.where = 0|
+	.where = STARPU_NONE|
 #ifdef STARPU_USE_CUDA
 		STARPU_CUDA|
 #endif

+ 3 - 3
gcc-plugin/src/starpu.c

@@ -787,7 +787,7 @@ handle_task_implementation_attribute (tree *node, tree name, tree args,
       TREE_USED (fn) = TREE_USED (task_decl);
 
       /* Check the `where' argument to raise a warning if needed.  */
-      if (task_implementation_target_to_int (where) == 0)
+      if (task_implementation_target_to_int (where) == STARPU_NONE)
 	warning_at (loc, 0,
 		    "unsupported target %E; task implementation won't be used",
 		    where);
@@ -965,7 +965,7 @@ task_implementation_target_to_int (const_tree target)
 		     TREE_STRING_LENGTH (target)))
     where_int = STARPU_CUDA;
   else
-    where_int = 0;
+    where_int = STARPU_NONE;
 
   return where_int;
 }
@@ -1418,7 +1418,7 @@ build_codelet_initializer (tree task_decl)
   tree where_init (tree impls)
   {
     tree impl;
-    int where_int = 0;
+    int where_int = STARPU_NONE;
 
     for (impl = impls;
 	 impl != NULL_TREE;

+ 1 - 1
src/core/task.c

@@ -226,7 +226,7 @@ void _starpu_codelet_check_deprecated_fields(struct starpu_codelet *cl)
 	if (!cl)
 		return;
 
-	int is_where_unset = cl->where == 0;
+	int is_where_unset = cl->where == STARPU_NONE;
 
 	/* Check deprecated and unset fields (where, <device>_func,
  	 * <device>_funcs) */

+ 1 - 1
tests/core/deprecated_func.c

@@ -111,7 +111,7 @@ int main(int argc, char **argv)
 	ret = starpu_init(NULL);
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_init");
 
-	for(where=0 ; where<=STARPU_CPU ; where+=STARPU_CPU)
+	for(where=STARPU_NONE ; where<=STARPU_CPU ; where+=STARPU_CPU)
 	{
 		ret = submit_codelet(&cl_cpu_func, where);
 		if (ret == -ENODEV)

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

@@ -58,7 +58,7 @@ create_and_submit_tasks(void)
 	int ret;
 	struct starpu_task *task;
 
-	cl.where = 0;
+	cl.where = STARPU_NONE;
 #ifdef STARPU_USE_CUDA
 	cl.where |= STARPU_CUDA;
 #endif