DPC++ Runtime
Runtime libraries for oneAPI Data Parallel C++
cl::sycl::detail::Locked< T > Class Template Reference

Represents a reference to value with appropriate lock acquired. More...

#include <CL/sycl/detail/locked.hpp>

Public Member Functions

 Locked (T &v, std::mutex &mutex)
 
Tget () const
 

Detailed Description

template<typename T>
class cl::sycl::detail::Locked< T >

Represents a reference to value with appropriate lock acquired.

Employed for acquire/release logic. Acquire action is construction of instance of locked<>. Release action is destruction of instance of locked<>.

Definition at line 24 of file locked.hpp.

Constructor & Destructor Documentation

◆ Locked()

template<typename T >
cl::sycl::detail::Locked< T >::Locked ( T v,
std::mutex &  mutex 
)
inline

Definition at line 29 of file locked.hpp.

Member Function Documentation

◆ get()

template<typename T >
T& cl::sycl::detail::Locked< T >::get ( ) const
inline

Definition at line 33 of file locked.hpp.


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