pub struct CudaSurfaceObject { /* private fields */ }Expand description
RAII wrapper for a CUDA bindless surface object.
Created by CudaSurfaceObject::create; automatically destroyed on drop.
Mirrors cudaCreateSurfaceObject / cudaDestroySurfaceObject.
The resource must be a CUDA array allocated with the
Array3DFlags::SURFACE_LDST flag (or equivalent).
Implementations§
Source§impl CudaSurfaceObject
impl CudaSurfaceObject
Sourcepub fn create(resource: &ResourceDesc) -> CudaRtResult<Self>
pub fn create(resource: &ResourceDesc) -> CudaRtResult<Self>
Create a surface object from a resource descriptor.
The resource type must be Array — surfaces cannot be backed by linear
or pitched memory.
§Errors
Returns CudaRtError::NotSupported if cuSurfObjectCreate is absent,
or propagates the driver error code.
Sourcepub fn raw(&self) -> CUsurfObject
pub fn raw(&self) -> CUsurfObject
Returns the raw CUsurfObject handle.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CudaSurfaceObject
impl RefUnwindSafe for CudaSurfaceObject
impl Send for CudaSurfaceObject
impl Sync for CudaSurfaceObject
impl Unpin for CudaSurfaceObject
impl UnsafeUnpin for CudaSurfaceObject
impl UnwindSafe for CudaSurfaceObject
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