reference

reference#

stdgpu: stdgpu::mutex_array< Block, Allocator >::reference
stdgpu Latest
Efficient STL-like Data Structures on the GPU
stdgpu::mutex_array< Block, Allocator >::reference

Detailed Description

template<typename Block = mutex_default_type, typename Allocator = safe_device_allocator<Block>>
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 ()