![]() |
cuLite v0.3.1
A lite CUDA C++ Interface
|
RAII helper for managing cuSPARSE pointer mode. More...
Public Member Functions | |
| CuSparseSpm (CuSparseHandler &cuSparseHandler, cusparsePointerMode_t mode) | |
| Constructor. | |
| ~CuSparseSpm () | |
| Destructor. | |
RAII helper for managing cuSPARSE pointer mode.
This class provides a scoped guard that temporarily sets a cuSPARSE pointer mode and automatically restores the previous mode when the object goes out of scope. This ensures proper cleanup even in the presence of exceptions.
| culite::CuSparseSpm::CuSparseSpm | ( | CuSparseHandler & | cuSparseHandler, |
| cusparsePointerMode_t | mode ) |
Constructor.
Sets the pointer mode for the given CuSparseHandler and stores the previous mode.
| [in] | cuSparseHandler | The CuSparseHandler whose pointer mode will be modified. |
| [in] | mode | The new pointer mode to set. |
| culite::CuSparseSpm::~CuSparseSpm | ( | ) |
Destructor.
Restores the pointer mode that was active before the constructor was called.