瀏覽代碼

examples/interface: give names to codelets

Nathalie Furmento 12 年之前
父節點
當前提交
54c4e31e17
共有 2 個文件被更改,包括 8 次插入5 次删除
  1. 4 3
      examples/interface/complex.c
  2. 4 2
      examples/interface/complex_codelet.h

+ 4 - 3
examples/interface/complex.c

@@ -59,7 +59,8 @@ struct starpu_codelet cl_copy =
 #endif
 	.nbuffers = 2,
 	.modes = {STARPU_R, STARPU_W},
-	.can_execute = can_execute
+	.can_execute = can_execute,
+	.name = "cl_copy"
 };
 
 #ifdef STARPU_USE_OPENCL
@@ -146,8 +147,8 @@ int main(int argc, char **argv)
 
 end:
 #ifdef STARPU_USE_OPENCL
-        ret = starpu_opencl_unload_opencl(&opencl_program);
-        STARPU_CHECK_RETURN_VALUE(ret, "starpu_opencl_unload_opencl");
+	ret = starpu_opencl_unload_opencl(&opencl_program);
+	STARPU_CHECK_RETURN_VALUE(ret, "starpu_opencl_unload_opencl");
 #endif
 	starpu_data_unregister(handle1);
 	starpu_data_unregister(handle2);

+ 4 - 2
examples/interface/complex_codelet.h

@@ -52,7 +52,8 @@ struct starpu_codelet cl_compare =
 {
 	.cpu_funcs = {compare_complex_codelet, NULL},
 	.nbuffers = 2,
-	.modes = {STARPU_R, STARPU_R}
+	.modes = {STARPU_R, STARPU_R},
+	.name = "cl_compare"
 };
 
 void display_complex_codelet(void *descr[], __attribute__ ((unused)) void *_args)
@@ -72,7 +73,8 @@ struct starpu_codelet cl_display =
 {
 	.cpu_funcs = {display_complex_codelet, NULL},
 	.nbuffers = 1,
-	.modes = {STARPU_R}
+	.modes = {STARPU_R},
+	.name = "cl_display"
 };
 
 #endif /* __COMPLEX_CODELET_H */