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

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

Public Member Functions

 CuBlasSpm (CuBlasHandler &cuBlasHandler, cublasPointerMode_t mode)
 Constructor.
 ~CuBlasSpm ()
 Destructor.

Detailed Description

RAII helper for managing cuBLAS pointer mode.

This class provides a scoped guard that temporarily sets a cuBLAS 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

◆ CuBlasSpm()

culite::CuBlasSpm::CuBlasSpm ( CuBlasHandler & cuBlasHandler,
cublasPointerMode_t mode )

Constructor.

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

Parameters
[in]cuBlasHandlerThe CuBlasHandler whose pointer mode will be modified.
[in]modeThe new pointer mode to set.

◆ ~CuBlasSpm()

culite::CuBlasSpm::~CuBlasSpm ( )

Destructor.

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