浏览代码

Data interfaces: synchronous methods can directly return the return value of the asynchronous method

Nathalie Furmento 15 年之前
父节点
当前提交
6d38d6cfce

+ 2 - 4
src/datawizard/interfaces/block_interface.c

@@ -759,14 +759,12 @@ static int copy_opencl_to_ram_async(void *src_interface, unsigned src_node __att
 
 static int copy_ram_to_opencl(void *src_interface, unsigned src_node __attribute__((unused)), void *dst_interface, unsigned dst_node __attribute__((unused)))
 {
-        copy_ram_to_opencl_async(src_interface, src_node, dst_interface, dst_node, NULL);
-	return 0;
+        return copy_ram_to_opencl_async(src_interface, src_node, dst_interface, dst_node, NULL);
 }
 
 static int copy_opencl_to_ram(void *src_interface, unsigned src_node __attribute__((unused)), void *dst_interface, unsigned dst_node __attribute__((unused)))
 {
-        copy_opencl_to_ram_async(src_interface, src_node, dst_interface, dst_node, NULL);
-	return 0;
+        return copy_opencl_to_ram_async(src_interface, src_node, dst_interface, dst_node, NULL);
 }
 
 #endif

+ 2 - 4
src/datawizard/interfaces/matrix_interface.c

@@ -509,14 +509,12 @@ static int copy_opencl_to_ram_async(void *src_interface, unsigned src_node __att
 
 static int copy_ram_to_opencl(void *src_interface, unsigned src_node __attribute__((unused)), void *dst_interface, unsigned dst_node __attribute__((unused)))
 {
-        copy_ram_to_opencl_async(src_interface, src_node, dst_interface, dst_node, NULL);
-	return 0;
+        return copy_ram_to_opencl_async(src_interface, src_node, dst_interface, dst_node, NULL);
 }
 
 static int copy_opencl_to_ram(void *src_interface, unsigned src_node __attribute__((unused)), void *dst_interface, unsigned dst_node __attribute__((unused)))
 {
-        copy_opencl_to_ram_async(src_interface, src_node, dst_interface, dst_node, NULL);
-	return 0;
+        return copy_opencl_to_ram_async(src_interface, src_node, dst_interface, dst_node, NULL);
 }
 
 #endif

+ 2 - 4
src/datawizard/interfaces/variable_interface.c

@@ -391,14 +391,12 @@ static int copy_opencl_to_ram_async(void *src_interface, unsigned src_node __att
 
 static int copy_ram_to_opencl(void *src_interface, unsigned src_node __attribute__((unused)), void *dst_interface, unsigned dst_node __attribute__((unused)))
 {
-        copy_ram_to_opencl_async(src_interface, src_node, dst_interface, dst_node, NULL);
-	return 0;
+        return copy_ram_to_opencl_async(src_interface, src_node, dst_interface, dst_node, NULL);
 }
 
 static int copy_opencl_to_ram(void *src_interface, unsigned src_node __attribute__((unused)), void *dst_interface, unsigned dst_node __attribute__((unused)))
 {
-        copy_opencl_to_ram_async(src_interface, src_node, dst_interface, dst_node, NULL);
-	return 0;
+        return copy_opencl_to_ram_async(src_interface, src_node, dst_interface, dst_node, NULL);
 }
 
 #endif

+ 2 - 4
src/datawizard/interfaces/vector_interface.c

@@ -432,15 +432,13 @@ static int copy_opencl_to_ram_async(void *src_interface, unsigned src_node __att
 static int copy_ram_to_opencl(void *src_interface, unsigned src_node __attribute__((unused)),
                               void *dst_interface, unsigned dst_node __attribute__((unused)))
 {
-        copy_ram_to_opencl_async(src_interface, src_node, dst_interface, dst_node, NULL);
-	return 0;
+        return copy_ram_to_opencl_async(src_interface, src_node, dst_interface, dst_node, NULL);
 }
 
 static int copy_opencl_to_ram(void *src_interface, unsigned src_node __attribute__((unused)),
 				void *dst_interface, unsigned dst_node __attribute__((unused)))
 {
-        copy_opencl_to_ram_async(src_interface, src_node, dst_interface, dst_node, NULL);
-	return 0;
+        return copy_opencl_to_ram_async(src_interface, src_node, dst_interface, dst_node, NULL);
 }
 #endif // STARPU_USE_OPENCL