#[repr(C)]pub struct CUDA_MEMCPY2D {Show 16 fields
pub src_x_in_bytes: usize,
pub src_y: usize,
pub src_memory_type: u32,
pub src_host: *const c_void,
pub src_device: CUdeviceptr,
pub src_array: CUarray,
pub src_pitch: usize,
pub dst_x_in_bytes: usize,
pub dst_y: usize,
pub dst_memory_type: u32,
pub dst_host: *mut c_void,
pub dst_device: CUdeviceptr,
pub dst_array: CUarray,
pub dst_pitch: usize,
pub width_in_bytes: usize,
pub height: usize,
}Expand description
Descriptor for a 2-D memory copy executed via cuMemcpy2D_v2.
Mirrors CUDA_MEMCPY2D in cuda.h. The CUDA driver inspects only the
fields appropriate for the source / destination memory types; the
remaining fields must be zeroed. Use CUDA_MEMCPY2D::default to
obtain a zero-initialised descriptor and only set the fields you need.
src_memory_type and dst_memory_type are stored as raw u32 for FFI
safety; convert to / from CUmemorytype manually.
Fields§
§src_x_in_bytes: usizeSource X offset in bytes.
src_y: usizeSource Y offset in rows.
src_memory_type: u32Source memory type; see CUmemorytype.
src_host: *const c_voidSource host pointer (only valid when src_memory_type == Host).
src_device: CUdeviceptrSource device pointer (only valid when src_memory_type == Device).
src_array: CUarraySource CUDA array (only valid when src_memory_type == Array).
src_pitch: usizeSource pitch in bytes (0 selects a tightly-packed layout).
dst_x_in_bytes: usizeDestination X offset in bytes.
dst_y: usizeDestination Y offset in rows.
dst_memory_type: u32Destination memory type; see CUmemorytype.
dst_host: *mut c_voidDestination host pointer (only valid when dst_memory_type == Host).
dst_device: CUdeviceptrDestination device pointer (only valid when dst_memory_type == Device).
dst_array: CUarrayDestination CUDA array (only valid when dst_memory_type == Array).
dst_pitch: usizeDestination pitch in bytes (0 selects a tightly-packed layout).
width_in_bytes: usizeWidth of the copied region in bytes.
height: usizeHeight of the copied region in rows.
Trait Implementations§
Source§impl Clone for CUDA_MEMCPY2D
impl Clone for CUDA_MEMCPY2D
Source§fn clone(&self) -> CUDA_MEMCPY2D
fn clone(&self) -> CUDA_MEMCPY2D
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more