Browse Source

Use "cl_event" instead of "void" in starpu_data_interfaces.h, since this is the real type.

Cyril Roelandt 12 years ago
parent
commit
08d2719c43
1 changed files with 8 additions and 6 deletions
  1. 8 6
      include/starpu_data_interfaces.h

+ 8 - 6
include/starpu_data_interfaces.h

@@ -21,6 +21,10 @@
 
 
 #include <starpu.h>
 #include <starpu.h>
 
 
+#if defined(STARPU_USE_OPENCL) && !defined(__CUDACC__)
+#include <starpu_opencl.h>
+#endif
+
 #ifdef STARPU_USE_GORDON
 #ifdef STARPU_USE_GORDON
 /* to get the gordon_strideSize_t data structure from gordon */
 /* to get the gordon_strideSize_t data structure from gordon */
 #include <gordon.h>
 #include <gordon.h>
@@ -77,13 +81,11 @@ struct starpu_data_copy_methods
 	int (*cuda_to_cuda_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, cudaStream_t stream);
 	int (*cuda_to_cuda_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, cudaStream_t stream);
 #endif
 #endif
 
 
-#ifdef STARPU_USE_OPENCL
+#if defined(STARPU_USE_OPENCL) && !defined(__CUDACC__)
 	/* for asynchronous OpenCL transfers */
 	/* for asynchronous OpenCL transfers */
-	/* XXX we do not use a cl_event *event type for the last argument
-	 * because nvcc does not like when we have to include OpenCL headers */
-        int (*ram_to_opencl_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, /* cl_event * */ void *event);
-	int (*opencl_to_ram_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, /* cl_event * */ void *event);
-	int (*opencl_to_opencl_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, /* cl_event * */ void *event);
+        int (*ram_to_opencl_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, cl_event *event);
+	int (*opencl_to_ram_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, cl_event *event);
+	int (*opencl_to_opencl_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, cl_event *event);
 #endif
 #endif
 };
 };