Opm::cuistl::detail::CuBlasHandle Class Reference

The CuBlasHandle class provides a singleton for the simulator universal cuBlasHandle. More...

#include <CuBlasHandle.hpp>

Public Member Functions

 CuBlasHandle (const CuBlasHandle &)=delete
 
CuBlasHandleoperator= (const CuBlasHandle &)=delete
 
 ~CuBlasHandle ()
 
cublasHandle_t get ()
 get returns the underlying cuBlas handle (to be used in calls to cublas) More...
 

Static Public Member Functions

static CuBlasHandlegetInstance ()
 getInstance creates (if necessary) and returns the single unique instance of CuBlasHandle (singleton) More...
 

Detailed Description

The CuBlasHandle class provides a singleton for the simulator universal cuBlasHandle.

Example use:

void someFunction() {
int cuBlasVersion = -1;
OPM_CUBLAS_SAFE_CALL(cublasGetVersion(cublasHandle.get(), &cuBlasVersion));
}
static CuBlasHandle & getInstance()
getInstance creates (if necessary) and returns the single unique instance of CuBlasHandle (singleton)
#define OPM_CUBLAS_SAFE_CALL(expression)
OPM_CUBLAS_SAFE_CALL checks the return type of the cublas expression (function call) and throws an ex...
Definition: cublas_safe_call.hpp:196

Constructor & Destructor Documentation

◆ CuBlasHandle()

Opm::cuistl::detail::CuBlasHandle::CuBlasHandle ( const CuBlasHandle )
delete

◆ ~CuBlasHandle()

Opm::cuistl::detail::CuBlasHandle::~CuBlasHandle ( )

Calls cublasDestroy() on the handle

Member Function Documentation

◆ get()

cublasHandle_t Opm::cuistl::detail::CuBlasHandle::get ( )

get returns the underlying cuBlas handle (to be used in calls to cublas)

◆ getInstance()

static CuBlasHandle & Opm::cuistl::detail::CuBlasHandle::getInstance ( )
static

getInstance creates (if necessary) and returns the single unique instance of CuBlasHandle (singleton)

◆ operator=()

CuBlasHandle & Opm::cuistl::detail::CuBlasHandle::operator= ( const CuBlasHandle )
delete

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