pub struct CudaTextureObject { /* private fields */ }Expand description
RAII wrapper for a CUDA bindless texture object.
Created by CudaTextureObject::create; automatically destroyed on drop.
Mirrors cudaCreateTextureObject / cudaDestroyTextureObject.
Implementations§
Source§impl CudaTextureObject
impl CudaTextureObject
Sourcepub fn create(
resource: &ResourceDesc,
texture: &TextureDesc,
view: Option<&ResourceViewDesc>,
) -> CudaRtResult<Self>
pub fn create( resource: &ResourceDesc, texture: &TextureDesc, view: Option<&ResourceViewDesc>, ) -> CudaRtResult<Self>
Create a texture object from a resource and texture descriptor.
view_desc is optional — pass None to use the resource’s native
format and full extent.
§Errors
Returns CudaRtError::NotSupported if cuTexObjectCreate is absent,
or propagates the driver error code.
Sourcepub fn raw(&self) -> CUtexObject
pub fn raw(&self) -> CUtexObject
Returns the raw CUtexObject handle.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CudaTextureObject
impl RefUnwindSafe for CudaTextureObject
impl Send for CudaTextureObject
impl Sync for CudaTextureObject
impl Unpin for CudaTextureObject
impl UnsafeUnpin for CudaTextureObject
impl UnwindSafe for CudaTextureObject
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