#[repr(C)]pub struct starpu_data_copy_methods {Show 25 fields
pub can_copy: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint, handling_node: c_uint) -> c_int>,
pub ram_to_ram: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint) -> c_int>,
pub ram_to_cuda: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint) -> c_int>,
pub ram_to_hip: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint) -> c_int>,
pub ram_to_opencl: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint) -> c_int>,
pub ram_to_max_fpga: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint) -> c_int>,
pub cuda_to_ram: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint) -> c_int>,
pub cuda_to_cuda: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint) -> c_int>,
pub hip_to_ram: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint) -> c_int>,
pub hip_to_hip: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint) -> c_int>,
pub opencl_to_ram: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint) -> c_int>,
pub opencl_to_opencl: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint) -> c_int>,
pub max_fpga_to_ram: Option<unsafe extern "C" fn(src_interface: *mut c_void, srd_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint) -> c_int>,
pub ram_to_cuda_async: Option<unsafe extern "C" fn() -> c_int>,
pub cuda_to_ram_async: Option<unsafe extern "C" fn() -> c_int>,
pub cuda_to_cuda_async: Option<unsafe extern "C" fn() -> c_int>,
pub ram_to_hip_async: Option<unsafe extern "C" fn() -> c_int>,
pub hip_to_ram_async: Option<unsafe extern "C" fn() -> c_int>,
pub hip_to_hip_async: Option<unsafe extern "C" fn() -> c_int>,
pub ram_to_opencl_async: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint, event: *mut cl_event) -> c_int>,
pub opencl_to_ram_async: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint, event: *mut cl_event) -> c_int>,
pub opencl_to_opencl_async: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint, event: *mut cl_event) -> c_int>,
pub ram_to_max_fpga_async: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint) -> c_int>,
pub max_fpga_to_ram_async: Option<unsafe extern "C" fn(src_interface: *mut c_void, srd_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint) -> c_int>,
pub any_to_any: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint, async_data: *mut c_void) -> c_int>,
}Expand description
Define the per-interface methods. If the starpu_data_copy_methods::any_to_any method is provided, it will be used by default if no specific method is provided. It can still be useful to provide more specific method in case of e.g. available particular CUDA, HIP or OpenCL support.
See \ref DefiningANewDataInterface_copy for more details.
Fields§
§can_copy: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint, handling_node: c_uint) -> c_int>If defined, allow the interface to declare whether it supports transferring from \p src_interface on node \p src_node to \p dst_interface on node \p dst_node, run from node \p handling_node. If not defined, it is assumed that the interface supports all transfers.
ram_to_ram: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint) -> c_int>Define how to copy data from the \p src_interface interface on the \p src_node CPU node to the \p dst_interface interface on the \p dst_node CPU node. Return 0 on success.
ram_to_cuda: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint) -> c_int>Define how to copy data from the \p src_interface interface on the \p src_node CPU node to the \p dst_interface interface on the \p dst_node CUDA node. Return 0 on success.
ram_to_hip: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint) -> c_int>Define how to copy data from the \p src_interface interface on the \p src_node CPU node to the \p dst_interface interface on the \p dst_node HIP node. Return 0 on success.
ram_to_opencl: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint) -> c_int>Define how to copy data from the \p src_interface interface on the \p src_node CPU node to the \p dst_interface interface on the \p dst_node OpenCL node. Return 0 on success.
ram_to_max_fpga: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint) -> c_int>Define how to copy data from the \p src_interface interface on the \p src_node CPU node to the \p dst_interface interface on the \p dst_node FPGA node. Return 0 on success.
cuda_to_ram: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint) -> c_int>Define how to copy data from the \p src_interface interface on the \p src_node CUDA node to the \p dst_interface interface on the \p dst_node CPU node. Return 0 on success.
cuda_to_cuda: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint) -> c_int>Define how to copy data from the \p src_interface interface on the \p src_node CUDA node to the \p dst_interface interface on the \p dst_node CUDA node. Return 0 on success.
hip_to_ram: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint) -> c_int>Define how to copy data from the \p src_interface interface on the \p src_node HIP node to the \p dst_interface interface on the \p dst_node CPU node. Return 0 on success.
hip_to_hip: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint) -> c_int>Define how to copy data from the \p src_interface interface on the \p src_node HIP node to the \p dst_interface interface on the \p dst_node HIP node. Return 0 on success.
opencl_to_ram: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint) -> c_int>Define how to copy data from the \p src_interface interface on the \p src_node OpenCL node to the \p dst_interface interface on the \p dst_node CPU node. Return 0 on success.
opencl_to_opencl: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint) -> c_int>Define how to copy data from the \p src_interface interface on the \p src_node OpenCL node to the \p dst_interface interface on the \p dst_node OpenCL node. Return 0 on success.
max_fpga_to_ram: Option<unsafe extern "C" fn(src_interface: *mut c_void, srd_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint) -> c_int>Define how to copy data from the \p src_interface interface on the \p src_node FPGA node to the \p dst_interface interface on the \p dst_node CPU node. Return 0 on success.
ram_to_cuda_async: Option<unsafe extern "C" fn() -> c_int>§cuda_to_ram_async: Option<unsafe extern "C" fn() -> c_int>§cuda_to_cuda_async: Option<unsafe extern "C" fn() -> c_int>§ram_to_hip_async: Option<unsafe extern "C" fn() -> c_int>§hip_to_ram_async: Option<unsafe extern "C" fn() -> c_int>§hip_to_hip_async: Option<unsafe extern "C" fn() -> c_int>§ram_to_opencl_async: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint, event: *mut cl_event) -> c_int>Define how to copy data from the \p src_interface interface on the
\p src_node CPU node to the \p dst_interface interface on the \p
dst_node OpenCL node, by recording in \p event, a pointer to a
opencl_to_ram_async: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint, event: *mut cl_event) -> c_int>Define how to copy data from the \p src_interface interface on the
\p src_node OpenCL node to the \p dst_interface interface on the
\p dst_node CPU node, by recording in \p event, a pointer to a
opencl_to_opencl_async: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint, event: *mut cl_event) -> c_int>Define how to copy data from the \p src_interface interface on the
\p src_node OpenCL node to the \p dst_interface interface on the
\p dst_node OpenCL node, by recording in \p event, a pointer to a
ram_to_max_fpga_async: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint) -> c_int>Define how to copy data from the \p src_interface interface on the
\p src_node CPU node to the \p dst_interface interface on the \p
dst_node FPGA node. Must return 0 if the transfer was actually
completed completely synchronously, or
max_fpga_to_ram_async: Option<unsafe extern "C" fn(src_interface: *mut c_void, srd_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint) -> c_int>Define how to copy data from the \p src_interface interface on the
\p src_node FPGA node to the \p dst_interface interface on the \p
dst_node CPU node. Must return 0 if the transfer was actually
completed completely synchronously, or
any_to_any: Option<unsafe extern "C" fn(src_interface: *mut c_void, src_node: c_uint, dst_interface: *mut c_void, dst_node: c_uint, async_data: *mut c_void) -> c_int>Define how to copy data from the \p src_interface interface on the
\p src_node node to the \p dst_interface interface on the \p
dst_node node. This is meant to be implemented through the
starpu_interface_copy() helper, to which async_data should be
passed as such, and will be used to manage asynchronicity. This
must return
This can only be implemented if the interface has ready-to-send data blocks. If the interface is more involved than this, i.e. it needs to collect pieces of data before transferring, starpu_data_interface_ops::pack_data and starpu_data_interface_ops::peek_data should be implemented instead, and the core will just transfer the resulting data buffer.
Trait Implementations§
Source§impl Clone for starpu_data_copy_methods
impl Clone for starpu_data_copy_methods
Source§fn clone(&self) -> starpu_data_copy_methods
fn clone(&self) -> starpu_data_copy_methods
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more