MCPcopy Create free account
hub / github.com/Rust-GPU/rust-cuda / version

Method version

crates/blastoff/src/context.rs:113–124  ·  view source on GitHub ↗

Returns the major, minor, and patch versions of the cuBLAS library.

(&self)

Source from the content-addressed store, hash-verified

111
112 /// Returns the major, minor, and patch versions of the cuBLAS library.
113 pub fn version(&self) -> (u32, u32, u32) {
114 let mut raw = MaybeUninit::<u32>::uninit();
115 unsafe {
116 // getVersion can't fail
117 sys::v2::cublasGetVersion_v2(self.raw, raw.as_mut_ptr().cast())
118 .to_result()
119 .unwrap();
120
121 let raw = raw.assume_init();
122 (raw / 1000, (raw % 1000) / 100, raw % 100)
123 }
124 }
125
126 /// Executes a given closure in a specific CUDA [`Stream`], specifically, it sets the current cublas stream
127 /// for the context, runs the closure, then unsets the stream back to NULL.

Callers

nothing calls this directly

Calls 3

to_resultMethod · 0.45
castMethod · 0.45
as_mut_ptrMethod · 0.45

Tested by

no test coverage detected