Skip to main content

CUDA_MEMCPY2D

Struct CUDA_MEMCPY2D 

Source
#[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: usize

Source X offset in bytes.

§src_y: usize

Source Y offset in rows.

§src_memory_type: u32

Source memory type; see CUmemorytype.

§src_host: *const c_void

Source host pointer (only valid when src_memory_type == Host).

§src_device: CUdeviceptr

Source device pointer (only valid when src_memory_type == Device).

§src_array: CUarray

Source CUDA array (only valid when src_memory_type == Array).

§src_pitch: usize

Source pitch in bytes (0 selects a tightly-packed layout).

§dst_x_in_bytes: usize

Destination X offset in bytes.

§dst_y: usize

Destination Y offset in rows.

§dst_memory_type: u32

Destination memory type; see CUmemorytype.

§dst_host: *mut c_void

Destination host pointer (only valid when dst_memory_type == Host).

§dst_device: CUdeviceptr

Destination device pointer (only valid when dst_memory_type == Device).

§dst_array: CUarray

Destination CUDA array (only valid when dst_memory_type == Array).

§dst_pitch: usize

Destination pitch in bytes (0 selects a tightly-packed layout).

§width_in_bytes: usize

Width of the copied region in bytes.

§height: usize

Height of the copied region in rows.

Trait Implementations§

Source§

impl Clone for CUDA_MEMCPY2D

Source§

fn clone(&self) -> CUDA_MEMCPY2D

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for CUDA_MEMCPY2D

Source§

impl Debug for CUDA_MEMCPY2D

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for CUDA_MEMCPY2D

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Send for CUDA_MEMCPY2D

Source§

impl Sync for CUDA_MEMCPY2D

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more