pub struct Resources(pub cuvsResources_t);
Expand description
Resources are objects that are shared between function calls, and includes things like CUDA streams, cuBLAS handles and other resources that are expensive to create.
Tuple Fields§
§0: cuvsResources_t
Implementations§
source§impl Resources
impl Resources
sourcepub fn set_cuda_stream(&self, stream: cudaStream_t) -> Result<()>
pub fn set_cuda_stream(&self, stream: cudaStream_t) -> Result<()>
Sets the current cuda stream
sourcepub fn get_cuda_stream(&self) -> Result<cudaStream_t>
pub fn get_cuda_stream(&self) -> Result<cudaStream_t>
Gets the current cuda stream
sourcepub fn sync_stream(&self) -> Result<()>
pub fn sync_stream(&self) -> Result<()>
Syncs the current cuda stream
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Resources
impl RefUnwindSafe for Resources
impl Send for Resources
impl Sync for Resources
impl Unpin for Resources
impl UnwindSafe for Resources
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