reference — stdgpu Latest documentation (original) (raw)
reference#
stdgpu: stdgpu::mutex_array< Block, Allocator >::reference
template<typename Block = mutex_default_type, typename Allocator = safe_device_allocator>
class stdgpu::mutex_array< Block, Allocator >::reference
A proxy class to model a mutex reference on the GPU.
Differences to std::mutex:
- No equivalent analogue
- Additional locked function to check the lock state of the mutex
| Public Member Functions | |
|---|---|
| STDGPU_HOST_DEVICE | reference ()=delete |
| STDGPU_DEVICE_ONLY bool | locked () const |
| STDGPU_DEVICE_ONLY bool | try_lock () |
| STDGPU_DEVICE_ONLY void | unlock () |