Bladeren bron

_starpu_codelet_check_deprecated_fields : fills in the "where" field of codelets, so that we can stop using it in the code, since it will be deprecated soon.

Cyril Roelandt 15 jaren geleden
bovenliggende
commit
20f1e8b993
1 gewijzigde bestanden met toevoegingen van 16 en 0 verwijderingen
  1. 16 0
      src/core/task.c

+ 16 - 0
src/core/task.c

@@ -238,6 +238,10 @@ void _starpu_codelet_check_deprecated_fields(struct starpu_codelet *cl)
 	{
 		cl->cpu_func = STARPU_MULTIPLE_CPU_IMPLEMENTATIONS;
 	}
+	if (cl && cl->cpu_funcs[0])
+	{
+		cl->where |= STARPU_CPU;
+	}
 
 	if (cl && cl->cuda_func && cl->cuda_func != STARPU_MULTIPLE_CUDA_IMPLEMENTATIONS && cl->cuda_funcs[0])
 	{
@@ -253,6 +257,10 @@ void _starpu_codelet_check_deprecated_fields(struct starpu_codelet *cl)
 	{
 		cl->cuda_func = STARPU_MULTIPLE_CUDA_IMPLEMENTATIONS;
 	}
+	if (cl && cl->cuda_funcs[0])
+	{
+		cl->where |= STARPU_CUDA;
+	}
 
 	if (cl && cl->opencl_func && cl->opencl_func != STARPU_MULTIPLE_OPENCL_IMPLEMENTATIONS && cl->opencl_funcs[0])
 	{
@@ -268,6 +276,10 @@ void _starpu_codelet_check_deprecated_fields(struct starpu_codelet *cl)
 	{
 		cl->opencl_func = STARPU_MULTIPLE_OPENCL_IMPLEMENTATIONS;
 	}
+	if (cl && cl->opencl_funcs[0])
+	{
+		cl->where |= STARPU_OPENCL;
+	}
 
 	if (cl && cl->gordon_func && cl->gordon_func != STARPU_MULTIPLE_GORDON_IMPLEMENTATIONS)
 	{
@@ -278,6 +290,10 @@ void _starpu_codelet_check_deprecated_fields(struct starpu_codelet *cl)
 	{
 		cl->gordon_func = STARPU_MULTIPLE_GORDON_IMPLEMENTATIONS;
 	}
+	if (cl && cl->gordon_funcs[0])
+	{
+		cl->where = STARPU_GORDON;
+	}
 }
 
 void _starpu_task_check_deprecated_fields(struct starpu_task *task)