cuLite v0.3.1
A lite CUDA C++ Interface
Loading...
Searching...
No Matches
culite::CuSparseSpm Class Reference

RAII helper for managing cuSPARSE pointer mode. More...

Public Member Functions

 CuSparseSpm (CuSparseHandler &cuSparseHandler, cusparsePointerMode_t mode)
 Constructor.
 ~CuSparseSpm ()
 Destructor.

Detailed Description

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.

Constructor & Destructor Documentation

◆ CuSparseSpm()

culite::CuSparseSpm::CuSparseSpm ( CuSparseHandler & cuSparseHandler,
cusparsePointerMode_t mode )

Constructor.

Sets the pointer mode for the given CuSparseHandler and stores the previous mode.

Parameters
[in]cuSparseHandlerThe CuSparseHandler whose pointer mode will be modified.
[in]modeThe new pointer mode to set.

◆ ~CuSparseSpm()

culite::CuSparseSpm::~CuSparseSpm ( )

Destructor.

Restores the pointer mode that was active before the constructor was called.