Loading...
Searching...
No Matches
Opm::gpuistl::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
CuBlasHandle & | operator= (const CuBlasHandle &)=delete
| ~CuBlasHandle ()
| Calls cublasDestroy() on the handle.
cublasHandle_t | get ()
| get returns the underlying cuBlas handle (to be used in calls to cublas)

## Static Public Member Functions

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

## Detailed Description

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

Example use:

#include <opm/simulators/linalg/gpuistl/detail/CuBlasHandle.hpp>
void someFunction() {
auto& cublasHandle = ::Opm::gpuistl::detail::CuBlasHandle::getInstance();
int cuBlasVersion = -1;
OPM_CUBLAS_SAFE_CALL(cublasGetVersion(cublasHandle.get(), &cuBlasVersion));
}
Opm::gpuistl::detail::CuBlasHandle::getInstance
static CuBlasHandle & getInstance()
getInstance creates (if necessary) and returns the single unique instance of CuBlasHandle (singleton)
Definition CuBlasHandle.cpp:43

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

- opm/simulators/linalg/gpuistl/detail/CuBlasHandle.hpp
- opm/simulators/linalg/gpuistl/detail/CuBlasHandle.cpp