pub enum ResourceDesc {
Array {
handle: CUarray,
},
MipmappedArray {
handle: CUmipmappedArray,
},
Linear {
dev_ptr: DevicePtr,
format: ArrayFormat,
num_channels: u32,
size_in_bytes: usize,
},
Pitch2d {
dev_ptr: DevicePtr,
format: ArrayFormat,
num_channels: u32,
width_in_elements: usize,
height: usize,
pitch_in_bytes: usize,
},
}Expand description
High-level resource description for texture and surface objects.
Converted to CUDA_RESOURCE_DESC when creating a CudaTextureObject
or CudaSurfaceObject.
Variants§
Array
A CUDA array resource (most common for textures and surfaces).
MipmappedArray
A mipmapped CUDA array resource.
Fields
§
handle: CUmipmappedArrayRaw mipmapped array handle.
Linear
Linear device-memory resource (no filtering beyond point).
Fields
§
format: ArrayFormatChannel element format.
Pitch2d
Pitched 2-D device-memory resource.
Implementations§
Source§impl ResourceDesc
impl ResourceDesc
Sourcepub fn as_raw(&self) -> CUDA_RESOURCE_DESC
pub fn as_raw(&self) -> CUDA_RESOURCE_DESC
Convert to the raw CUDA_RESOURCE_DESC expected by the driver.
Trait Implementations§
Source§impl Clone for ResourceDesc
impl Clone for ResourceDesc
Source§fn clone(&self) -> ResourceDesc
fn clone(&self) -> ResourceDesc
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ResourceDesc
Auto Trait Implementations§
impl Freeze for ResourceDesc
impl RefUnwindSafe for ResourceDesc
impl Send for ResourceDesc
impl Sync for ResourceDesc
impl Unpin for ResourceDesc
impl UnsafeUnpin for ResourceDesc
impl UnwindSafe for ResourceDesc
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