浏览代码

_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 13 年之前
父节点
当前提交
20f1e8b993
共有 1 个文件被更改,包括 16 次插入0 次删除
  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)