|
@@ -396,7 +396,7 @@ 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)
|
|
|
+ void *dst_interface, unsigned dst_node __attribute__((unused)), void *_event)
|
|
|
{
|
|
|
starpu_vector_interface_t *src_vector = src_interface;
|
|
|
starpu_vector_interface_t *dst_vector = dst_interface;
|
|
@@ -434,36 +434,16 @@ 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)))
|
|
|
+ void *dst_interface, unsigned dst_node __attribute__((unused)))
|
|
|
{
|
|
|
- starpu_vector_interface_t *src_vector = src_interface;
|
|
|
- starpu_vector_interface_t *dst_vector = dst_interface;
|
|
|
-
|
|
|
- int err = _starpu_opencl_copy_to_opencl((void*)src_vector->ptr, (cl_mem)dst_vector->dev_handle, src_vector->nx*src_vector->elemsize,
|
|
|
- dst_vector->offset, NULL);
|
|
|
-
|
|
|
- if (STARPU_UNLIKELY(err))
|
|
|
- STARPU_OPENCL_REPORT_ERROR(err);
|
|
|
-
|
|
|
- STARPU_TRACE_DATA_COPY(src_node, dst_node, src_vector->nx*src_vector->elemsize);
|
|
|
-
|
|
|
+ copy_ram_to_opencl_async(src_interface, src_node, dst_interface, dst_node, NULL);
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
static int copy_opencl_to_ram(void *src_interface, unsigned src_node __attribute__((unused)),
|
|
|
void *dst_interface, unsigned dst_node __attribute__((unused)))
|
|
|
{
|
|
|
- starpu_vector_interface_t *src_vector = src_interface;
|
|
|
- starpu_vector_interface_t *dst_vector = dst_interface;
|
|
|
-
|
|
|
- int err = _starpu_opencl_copy_from_opencl((cl_mem)src_vector->dev_handle, (void*)dst_vector->ptr, src_vector->nx*src_vector->elemsize,
|
|
|
- src_vector->offset, NULL);
|
|
|
-
|
|
|
- if (STARPU_UNLIKELY(err))
|
|
|
- STARPU_OPENCL_REPORT_ERROR(err);
|
|
|
-
|
|
|
- STARPU_TRACE_DATA_COPY(src_node, dst_node, src_vector->nx*src_vector->elemsize);
|
|
|
-
|
|
|
+ copy_opencl_to_ram_async(src_interface, src_node, dst_interface, dst_node, NULL);
|
|
|
return 0;
|
|
|
}
|
|
|
|