pub struct cudaResourceDesc {
pub res_type: c_int,
pub payload: [u8; 32],
/* private fields */
}Expand description
cudaResourceDesc — tagged union describing a texture/surface source.
Layout: type: i32 + 4-byte pad + 32-byte union payload + 8-byte pad.
We model the union as an opaque byte buffer and expose typed builders.
Fields§
§res_type: c_int§payload: [u8; 32]32 bytes — the widest union arm (pitch2D: devPtr + desc + w + h + pitch).
Implementations§
Source§impl cudaResourceDesc
impl cudaResourceDesc
Sourcepub fn from_array(array: cudaArray_t) -> Self
pub fn from_array(array: cudaArray_t) -> Self
Build an ARRAY-type descriptor.
Sourcepub fn from_mipmapped(mipmap: cudaMipmappedArray_t) -> Self
pub fn from_mipmapped(mipmap: cudaMipmappedArray_t) -> Self
Build a MIPMAPPED_ARRAY-type descriptor.
Sourcepub fn from_linear(
dev_ptr: *mut c_void,
desc: cudaChannelFormatDesc,
size_in_bytes: usize,
) -> Self
pub fn from_linear( dev_ptr: *mut c_void, desc: cudaChannelFormatDesc, size_in_bytes: usize, ) -> Self
Build a LINEAR-type descriptor: bytewise view of a device pointer.
Trait Implementations§
Source§impl Clone for cudaResourceDesc
impl Clone for cudaResourceDesc
Source§fn clone(&self) -> cudaResourceDesc
fn clone(&self) -> cudaResourceDesc
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for cudaResourceDesc
impl Debug for cudaResourceDesc
Source§impl Default for cudaResourceDesc
impl Default for cudaResourceDesc
impl Copy for cudaResourceDesc
Auto Trait Implementations§
impl Freeze for cudaResourceDesc
impl RefUnwindSafe for cudaResourceDesc
impl Send for cudaResourceDesc
impl Sync for cudaResourceDesc
impl Unpin for cudaResourceDesc
impl UnsafeUnpin for cudaResourceDesc
impl UnwindSafe for cudaResourceDesc
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more