SLATE 2024.05.31
Software for Linear Algebra Targeting Exascale
Loading...
Searching...
No Matches
slate::LockGuard Class Reference

Constructor acquires lock; destructor releases lock. More...

#include <LockGuard.hh>

Public Member Functions

 LockGuard (omp_nest_lock_t *lock)
 Acquire nested lock.
 
 ~LockGuard ()
 Release nested lock.
 

Detailed Description

Constructor acquires lock; destructor releases lock.

This provides safety in case an exception is thrown, which would otherwise by-pass the unlock. Like std::lock_guard, but for OpenMP nested locks.

Constructor & Destructor Documentation

◆ LockGuard()

slate::LockGuard::LockGuard ( omp_nest_lock_t *  lock)
inline

Acquire nested lock.

Parameters
[in,out]lockOpenMP nested lock. Must be initialized already.

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