pub struct CusparseCompatHandle { /* private fields */ }Expand description
A cuSPARSE-compatible library handle, analogous to cusparseHandle_t.
Created with CusparseCompatHandle::create and released with
CusparseCompatHandle::destroy (which consumes the handle, matching
cusparseDestroy). Every operation in this module takes a handle reference
as its first argument and records itself in the handle’s operation counter,
so a caller can observe activity over the handle’s lifetime.
Implementations§
Source§impl CusparseCompatHandle
impl CusparseCompatHandle
Sourcepub fn create() -> SparseResult<Self>
pub fn create() -> SparseResult<Self>
Creates a new handle with the default (CusparsePointerMode::Host)
pointer mode, analogous to cusparseCreate.
§Errors
This host shim never fails to create a handle; the SparseResult
return type preserves the cuSPARSE signature shape.
Sourcepub fn destroy(self) -> SparseResult<()>
pub fn destroy(self) -> SparseResult<()>
Releases the handle, analogous to cusparseDestroy.
Consuming self makes use-after-destroy a compile-time error, the
idiomatic-Rust equivalent of invalidating the opaque cuSPARSE handle.
§Errors
Never returns an error in this host shim.
Sourcepub fn pointer_mode(&self) -> CusparsePointerMode
pub fn pointer_mode(&self) -> CusparsePointerMode
Returns the current scalar pointer mode.
Sourcepub fn set_pointer_mode(&mut self, mode: CusparsePointerMode)
pub fn set_pointer_mode(&mut self, mode: CusparsePointerMode)
Sets the scalar pointer mode, analogous to cusparseSetPointerMode.