pub struct Context { /* private fields */ }
Expand description
Provides a the low-level cuBLAS context.
Implementations§
source§impl Context
impl Context
sourcepub fn new() -> Result<Context, Error>
pub fn new() -> Result<Context, Error>
Create a new cuBLAS Context by calling the low-level API.
Context creation should done as sparely as possible. It is best to keep a context around as long as possible.
sourcepub fn from_c(id: cublasHandle_t) -> Context
pub fn from_c(id: cublasHandle_t) -> Context
Create a new cuBLAS Context from its C type.
sourcepub fn id_c(&self) -> &cublasHandle_t
pub fn id_c(&self) -> &cublasHandle_t
Returns the cuBLAS Context as its C type.
pub fn pointer_mode(&self) -> Result<PointerMode, Error>
pub fn set_pointer_mode( &mut self, pointer_mode: PointerMode ) -> Result<(), Error>
pub fn asum( &self, x: *mut f32, result: *mut f32, n: i32, stride: Option<i32> ) -> Result<(), Error>
pub fn axpy( &self, alpha: *mut f32, x: *mut f32, y: *mut f32, n: i32, stride_x: Option<i32>, stride_y: Option<i32> ) -> Result<(), Error>
pub fn copy( &self, x: *mut f32, y: *mut f32, n: i32, stride_x: Option<i32>, stride_y: Option<i32> ) -> Result<(), Error>
pub fn dot( &self, x: *mut f32, y: *mut f32, result: *mut f32, n: i32, stride_x: Option<i32>, stride_y: Option<i32> ) -> Result<(), Error>
pub fn nrm2( &self, x: *mut f32, result: *mut f32, n: i32, stride_x: Option<i32> ) -> Result<(), Error>
pub fn scal( &self, alpha: *mut f32, x: *mut f32, n: i32, stride_x: Option<i32> ) -> Result<(), Error>
pub fn swap( &self, x: *mut f32, y: *mut f32, n: i32, stride_x: Option<i32>, stride_y: Option<i32> ) -> Result<(), Error>
pub fn gemm( &self, transa: Operation, transb: Operation, m: i32, n: i32, k: i32, alpha: *mut f32, a: *mut f32, lda: i32, b: *mut f32, ldb: i32, beta: *mut f32, c: *mut f32, ldc: i32 ) -> Result<(), Error>
pub fn get_version(&self) -> i32
Trait Implementations§
impl Send for Context
Auto Trait Implementations§
impl RefUnwindSafe for Context
impl !Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
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