Opm::cuistl::detail::CuSparseHandle Class Reference

The CuSparseHandle class provides a singleton for the simulator universal cuSparseHandle. More...

#include <CuSparseHandle.hpp>

Public Member Functions

 CuSparseHandle (const CuSparseHandle &)=delete
 
CuSparseHandleoperator= (const CuSparseHandle &)=delete
 
 ~CuSparseHandle ()
 
cusparseHandle_t get ()
 get returns the underlying cuSparse handle (to be used in calls to cusparse) More...
 

Static Public Member Functions

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

Detailed Description

The CuSparseHandle class provides a singleton for the simulator universal cuSparseHandle.

Example use:

void someFunction() {
int cuSparseVersion = -1;
OPM_CUSPARSE_SAFE_CALL(cusparseGetVersion(cuSparseHandle.get(), &cuSparseVersion));
}
static CuSparseHandle & getInstance()
getInstance creates (if necessary) and returns the single unique instance of CuSparseHandle (singleto...
#define OPM_CUSPARSE_SAFE_CALL(expression)
OPM_CUSPARSE_SAFE_CALL checks the return type of the cusparse expression (function call) and throws a...
Definition: cusparse_safe_call.hpp:185

Constructor & Destructor Documentation

◆ CuSparseHandle()

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

◆ ~CuSparseHandle()

Opm::cuistl::detail::CuSparseHandle::~CuSparseHandle ( )

Calls cuSparseDestroy on the handle

Member Function Documentation

◆ get()

cusparseHandle_t Opm::cuistl::detail::CuSparseHandle::get ( )

get returns the underlying cuSparse handle (to be used in calls to cusparse)

◆ getInstance()

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

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

◆ operator=()

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

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