瀏覽代碼

data_interface: make ABI independant on whatever is available

Nathalie Furmento 10 年之前
父節點
當前提交
199b6875e0

+ 8 - 6
include/starpu_data_interfaces.h

@@ -63,21 +63,23 @@ struct starpu_data_copy_methods
 	int (*cuda_to_ram_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);
 #else
-#ifdef STARPU_SIMGRID
-	int cuda_to_cuda_async;
-#endif
+	int (*ram_to_cuda_async)();
+	int (*cuda_to_ram_async)();
+	int (*cuda_to_cuda_async)();
 #endif
 
 #if defined(STARPU_USE_OPENCL) && !defined(__CUDACC__)
 	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);
+#else
+	int (*ram_to_opencl_async)();
+	int (*opencl_to_ram_async)();
+	int (*opencl_to_opencl_async)();
 #endif
 
-#ifdef STARPU_USE_MIC
-	int (*ram_to_mic_async)(void *src_intreface, unsigned src_node, void *dst_interface, unsigned dst_node);
+	int (*ram_to_mic_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node);
 	int (*mic_to_ram_async)(void *src_interface, unsigned srd_node, void *dst_interface, unsigned dst_node);
-#endif
 
 	int (*any_to_any)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, void *async_data);
 };

+ 1 - 1
src/datawizard/interfaces/matrix_interface.c

@@ -57,7 +57,7 @@ static const struct starpu_data_copy_methods matrix_copy_data_methods_s =
 #else
 #ifdef STARPU_SIMGRID
 	/* Enable GPU-GPU transfers in simgrid */
-	.cuda_to_cuda_async = 1,
+	.cuda_to_cuda_async = (void *)1,
 #endif
 #endif
 #ifdef STARPU_USE_OPENCL

+ 2 - 2
src/datawizard/interfaces/multiformat_interface.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2011-2012  Institut National de Recherche en Informatique et Automatique
- * Copyright (C) 2012, 2013       Centre National de la Recherche Scientifique
+ * Copyright (C) 2012, 2013, 2014       Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -62,7 +62,7 @@ static const struct starpu_data_copy_methods multiformat_copy_data_methods_s =
 #else
 #ifdef STARPU_SIMGRID
 	/* Enable GPU-GPU transfers in simgrid */
-	.cuda_to_cuda_async = 1,
+	.cuda_to_cuda_async = (void *)1,
 #endif
 #endif
 #ifdef STARPU_USE_OPENCL