mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
Loading...
Searching...
No Matches
mx::cuda::cublasHandle Struct Reference

Management of a cublas handle.

RAII management of a cublas handle.

The handle is not created automatically on default construction, e.g. in case it is desired to do so in a critical block scope.

The handle is destroyed on the call to this class's destructor.

Todo:
throw exceptions in cuda::cublasHandle

Definition at line 48 of file cublasHandle.hpp.

#include <math/cuda/cublasHandle.hpp>

Public Member Functions

 cublasHandle ()
 Default c'tor.
 
 cublasHandle (bool create)
 Constructor with option to create / not create the handle.
 
 ~cublasHandle ()
 Destructor.
 
void create ()
 Create (allocate) the handle.
 
cublasHandle_t operator() ()
 Get the handle for use in calls to cublas routines.
 
 operator cublasHandle_t ()
 Conversion operator, allows objects of this class to be used as if they are the handle.
 

Constructor & Destructor Documentation

◆ cublasHandle() [1/2]

mx::cuda::cublasHandle::cublasHandle ( )
inline

Default c'tor.

Creates the handle.

Definition at line 58 of file cublasHandle.hpp.

References create().

◆ cublasHandle() [2/2]

mx::cuda::cublasHandle::cublasHandle ( bool  create)
inlineexplicit

Constructor with option to create / not create the handle.

Parameters
[in]createif true the handle is created. if false it is not created.

Definition at line 64 of file cublasHandle.hpp.

References create().

◆ ~cublasHandle()

mx::cuda::cublasHandle::~cublasHandle ( )
inline

Destructor.

Definition at line 73 of file cublasHandle.hpp.

Member Function Documentation

◆ create()

void mx::cuda::cublasHandle::create ( )
inline

Create (allocate) the handle.

Definition at line 82 of file cublasHandle.hpp.

Referenced by cublasHandle(), and cublasHandle().

◆ operator cublasHandle_t()

mx::cuda::cublasHandle::operator cublasHandle_t ( )
inline

Conversion operator, allows objects of this class to be used as if they are the handle.

Returns
the cublas handle

Definition at line 105 of file cublasHandle.hpp.

◆ operator()()

cublasHandle_t mx::cuda::cublasHandle::operator() ( )
inline

Get the handle for use in calls to cublas routines.

Returns
the cublas handle

Definition at line 96 of file cublasHandle.hpp.


The documentation for this struct was generated from the following file: