|
@@ -25,21 +25,21 @@
|
|
|
#include <starpu_opencl.h>
|
|
|
#include <drivers/opencl/driver_opencl.h>
|
|
|
|
|
|
-static int copy_ram_to_ram(void *src_interface, unsigned src_node __attribute__((unused)), void *dst_interface, unsigned dst_node);
|
|
|
+static int copy_ram_to_ram(void *src_interface, unsigned src_node STARPU_ATTRIBUTE_UNUSED, void *dst_interface, unsigned dst_node);
|
|
|
#ifdef STARPU_USE_CUDA
|
|
|
-static int copy_ram_to_cuda(void *src_interface, unsigned src_node __attribute__((unused)), void *dst_interface, unsigned dst_node);
|
|
|
-static int copy_cuda_to_ram(void *src_interface, unsigned src_node __attribute__((unused)), void *dst_interface, unsigned dst_node);
|
|
|
-static int copy_ram_to_cuda_async(void *src_interface, unsigned src_node __attribute__((unused)), void *dst_interface, unsigned dst_node, cudaStream_t stream);
|
|
|
-static int copy_cuda_to_ram_async(void *src_interface, unsigned src_node __attribute__((unused)), void *dst_interface, unsigned dst_node, cudaStream_t stream);
|
|
|
-static int copy_cuda_to_cuda(void *src_interface, unsigned src_node __attribute__((unused)), void *dst_interface, unsigned dst_node __attribute__((unused)));
|
|
|
+static int copy_ram_to_cuda(void *src_interface, unsigned src_node STARPU_ATTRIBUTE_UNUSED, void *dst_interface, unsigned dst_node);
|
|
|
+static int copy_cuda_to_ram(void *src_interface, unsigned src_node STARPU_ATTRIBUTE_UNUSED, void *dst_interface, unsigned dst_node);
|
|
|
+static int copy_ram_to_cuda_async(void *src_interface, unsigned src_node STARPU_ATTRIBUTE_UNUSED, void *dst_interface, unsigned dst_node, cudaStream_t stream);
|
|
|
+static int copy_cuda_to_ram_async(void *src_interface, unsigned src_node STARPU_ATTRIBUTE_UNUSED, void *dst_interface, unsigned dst_node, cudaStream_t stream);
|
|
|
+static int copy_cuda_to_cuda(void *src_interface, unsigned src_node STARPU_ATTRIBUTE_UNUSED, void *dst_interface, unsigned dst_node STARPU_ATTRIBUTE_UNUSED);
|
|
|
static int copy_cuda_to_cuda_async(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, cudaStream_t stream);
|
|
|
#endif
|
|
|
#ifdef STARPU_USE_OPENCL
|
|
|
-static int copy_ram_to_opencl(void *src_interface, unsigned src_node __attribute__((unused)), void *dst_interface, unsigned dst_node);
|
|
|
-static int copy_opencl_to_ram(void *src_interface, unsigned src_node __attribute__((unused)), void *dst_interface, unsigned dst_node);
|
|
|
-static int copy_opencl_to_opencl(void *src_interface, unsigned src_node __attribute__((unused)), void *dst_interface, unsigned dst_node);
|
|
|
-static int copy_ram_to_opencl_async(void *src_interface, unsigned src_node __attribute__((unused)), void *dst_interface, unsigned dst_node, void *_event);
|
|
|
-static int copy_opencl_to_ram_async(void *src_interface, unsigned src_node __attribute__((unused)), void *dst_interface, unsigned dst_node, void *_event);
|
|
|
+static int copy_ram_to_opencl(void *src_interface, unsigned src_node STARPU_ATTRIBUTE_UNUSED, void *dst_interface, unsigned dst_node);
|
|
|
+static int copy_opencl_to_ram(void *src_interface, unsigned src_node STARPU_ATTRIBUTE_UNUSED, void *dst_interface, unsigned dst_node);
|
|
|
+static int copy_opencl_to_opencl(void *src_interface, unsigned src_node STARPU_ATTRIBUTE_UNUSED, void *dst_interface, unsigned dst_node);
|
|
|
+static int copy_ram_to_opencl_async(void *src_interface, unsigned src_node STARPU_ATTRIBUTE_UNUSED, void *dst_interface, unsigned dst_node, void *_event);
|
|
|
+static int copy_opencl_to_ram_async(void *src_interface, unsigned src_node STARPU_ATTRIBUTE_UNUSED, void *dst_interface, unsigned dst_node, void *_event);
|
|
|
#endif
|
|
|
|
|
|
static const struct starpu_data_copy_methods vector_copy_data_methods_s = {
|
|
@@ -322,8 +322,8 @@ static void free_vector_buffer_on_node(void *data_interface, uint32_t node)
|
|
|
}
|
|
|
|
|
|
#ifdef STARPU_USE_CUDA
|
|
|
-static int copy_cuda_common(void *src_interface, unsigned src_node __attribute__((unused)),
|
|
|
- void *dst_interface, unsigned dst_node __attribute__((unused)), enum cudaMemcpyKind kind)
|
|
|
+static int copy_cuda_common(void *src_interface, unsigned src_node STARPU_ATTRIBUTE_UNUSED,
|
|
|
+ void *dst_interface, unsigned dst_node STARPU_ATTRIBUTE_UNUSED, enum cudaMemcpyKind kind)
|
|
|
{
|
|
|
starpu_vector_interface_t *src_vector = src_interface;
|
|
|
starpu_vector_interface_t *dst_vector = dst_interface;
|
|
@@ -374,20 +374,20 @@ static int copy_cuda_peer_common(void *src_interface, unsigned src_node,
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
-static int copy_cuda_to_ram(void *src_interface, unsigned src_node __attribute__((unused)),
|
|
|
- void *dst_interface, unsigned dst_node __attribute__((unused)))
|
|
|
+static int copy_cuda_to_ram(void *src_interface, unsigned src_node STARPU_ATTRIBUTE_UNUSED,
|
|
|
+ void *dst_interface, unsigned dst_node STARPU_ATTRIBUTE_UNUSED)
|
|
|
{
|
|
|
return copy_cuda_common(src_interface, src_node, dst_interface, dst_node, cudaMemcpyDeviceToHost);
|
|
|
}
|
|
|
|
|
|
-static int copy_ram_to_cuda(void *src_interface, unsigned src_node __attribute__((unused)),
|
|
|
- void *dst_interface, unsigned dst_node __attribute__((unused)))
|
|
|
+static int copy_ram_to_cuda(void *src_interface, unsigned src_node STARPU_ATTRIBUTE_UNUSED,
|
|
|
+ void *dst_interface, unsigned dst_node STARPU_ATTRIBUTE_UNUSED)
|
|
|
{
|
|
|
return copy_cuda_common(src_interface, src_node, dst_interface, dst_node, cudaMemcpyHostToDevice);
|
|
|
}
|
|
|
|
|
|
-static int copy_cuda_to_cuda(void *src_interface, unsigned src_node __attribute__((unused)),
|
|
|
- void *dst_interface, unsigned dst_node __attribute__((unused)))
|
|
|
+static int copy_cuda_to_cuda(void *src_interface, unsigned src_node STARPU_ATTRIBUTE_UNUSED,
|
|
|
+ void *dst_interface, unsigned dst_node STARPU_ATTRIBUTE_UNUSED)
|
|
|
{
|
|
|
if (src_node == dst_node)
|
|
|
{
|
|
@@ -404,8 +404,8 @@ static int copy_cuda_to_cuda(void *src_interface, unsigned src_node __attribute_
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-static int copy_cuda_async_common(void *src_interface, unsigned src_node __attribute__((unused)),
|
|
|
- void *dst_interface, unsigned dst_node __attribute__((unused)),
|
|
|
+static int copy_cuda_async_common(void *src_interface, unsigned src_node STARPU_ATTRIBUTE_UNUSED,
|
|
|
+ void *dst_interface, unsigned dst_node STARPU_ATTRIBUTE_UNUSED,
|
|
|
cudaStream_t stream, enum cudaMemcpyKind kind)
|
|
|
{
|
|
|
starpu_vector_interface_t *src_vector = src_interface;
|
|
@@ -446,14 +446,14 @@ static int copy_cuda_to_cuda_async(void *src_interface, unsigned src_node, v
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-static int copy_cuda_to_ram_async(void *src_interface, unsigned src_node __attribute__((unused)),
|
|
|
- void *dst_interface, unsigned dst_node __attribute__((unused)), cudaStream_t stream)
|
|
|
+static int copy_cuda_to_ram_async(void *src_interface, unsigned src_node STARPU_ATTRIBUTE_UNUSED,
|
|
|
+ void *dst_interface, unsigned dst_node STARPU_ATTRIBUTE_UNUSED, cudaStream_t stream)
|
|
|
{
|
|
|
return copy_cuda_async_common(src_interface, src_node, dst_interface, dst_node, stream, cudaMemcpyDeviceToHost);
|
|
|
}
|
|
|
|
|
|
-static int copy_ram_to_cuda_async(void *src_interface, unsigned src_node __attribute__((unused)),
|
|
|
- void *dst_interface, unsigned dst_node __attribute__((unused)), cudaStream_t stream)
|
|
|
+static int copy_ram_to_cuda_async(void *src_interface, unsigned src_node STARPU_ATTRIBUTE_UNUSED,
|
|
|
+ void *dst_interface, unsigned dst_node STARPU_ATTRIBUTE_UNUSED, cudaStream_t stream)
|
|
|
{
|
|
|
return copy_cuda_async_common(src_interface, src_node, dst_interface, dst_node, stream, cudaMemcpyHostToDevice);
|
|
|
}
|
|
@@ -461,8 +461,8 @@ static int copy_ram_to_cuda_async(void *src_interface, unsigned src_node __attri
|
|
|
#endif // STARPU_USE_CUDA
|
|
|
|
|
|
#ifdef STARPU_USE_OPENCL
|
|
|
-static int copy_ram_to_opencl_async(void *src_interface, unsigned src_node __attribute__((unused)),
|
|
|
- void *dst_interface, unsigned dst_node __attribute__((unused)), void *_event)
|
|
|
+static int copy_ram_to_opencl_async(void *src_interface, unsigned src_node STARPU_ATTRIBUTE_UNUSED,
|
|
|
+ void *dst_interface, unsigned dst_node STARPU_ATTRIBUTE_UNUSED, void *_event)
|
|
|
{
|
|
|
starpu_vector_interface_t *src_vector = src_interface;
|
|
|
starpu_vector_interface_t *dst_vector = dst_interface;
|
|
@@ -479,8 +479,8 @@ static int copy_ram_to_opencl_async(void *src_interface, unsigned src_node __att
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
-static int copy_opencl_to_ram_async(void *src_interface, unsigned src_node __attribute__((unused)),
|
|
|
- void *dst_interface, unsigned dst_node __attribute__((unused)), void *_event)
|
|
|
+static int copy_opencl_to_ram_async(void *src_interface, unsigned src_node STARPU_ATTRIBUTE_UNUSED,
|
|
|
+ void *dst_interface, unsigned dst_node STARPU_ATTRIBUTE_UNUSED, void *_event)
|
|
|
{
|
|
|
starpu_vector_interface_t *src_vector = src_interface;
|
|
|
starpu_vector_interface_t *dst_vector = dst_interface;
|
|
@@ -496,20 +496,20 @@ static int copy_opencl_to_ram_async(void *src_interface, unsigned src_node __att
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
-static int copy_ram_to_opencl(void *src_interface, unsigned src_node __attribute__((unused)),
|
|
|
- void *dst_interface, unsigned dst_node __attribute__((unused)))
|
|
|
+static int copy_ram_to_opencl(void *src_interface, unsigned src_node STARPU_ATTRIBUTE_UNUSED,
|
|
|
+ void *dst_interface, unsigned dst_node STARPU_ATTRIBUTE_UNUSED)
|
|
|
{
|
|
|
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)))
|
|
|
+static int copy_opencl_to_ram(void *src_interface, unsigned src_node STARPU_ATTRIBUTE_UNUSED,
|
|
|
+ void *dst_interface, unsigned dst_node STARPU_ATTRIBUTE_UNUSED)
|
|
|
{
|
|
|
return copy_opencl_to_ram_async(src_interface, src_node, dst_interface, dst_node, NULL);
|
|
|
}
|
|
|
|
|
|
-static int copy_opencl_to_opencl(void *src_interface, unsigned src_node __attribute__((unused)),
|
|
|
- void *dst_interface, unsigned dst_node __attribute__((unused)))
|
|
|
+static int copy_opencl_to_opencl(void *src_interface, unsigned src_node STARPU_ATTRIBUTE_UNUSED,
|
|
|
+ void *dst_interface, unsigned dst_node STARPU_ATTRIBUTE_UNUSED)
|
|
|
{
|
|
|
int err;
|
|
|
|
|
@@ -533,8 +533,8 @@ static int copy_opencl_to_opencl(void *src_interface, unsigned src_node __attrib
|
|
|
|
|
|
#endif // STARPU_USE_OPENCL
|
|
|
|
|
|
-static int copy_ram_to_ram(void *src_interface, unsigned src_node __attribute__((unused)),
|
|
|
- void *dst_interface, unsigned dst_node __attribute__((unused)))
|
|
|
+static int copy_ram_to_ram(void *src_interface, unsigned src_node STARPU_ATTRIBUTE_UNUSED,
|
|
|
+ void *dst_interface, unsigned dst_node STARPU_ATTRIBUTE_UNUSED)
|
|
|
{
|
|
|
starpu_vector_interface_t *src_vector = src_interface;
|
|
|
starpu_vector_interface_t *dst_vector = dst_interface;
|