operator[]

operator[]#

stdgpu: stdgpu::mutex_array::operator[]
stdgpu Latest
Efficient STL-like Data Structures on the GPU

◆ operator[]() [1/2]

template<typename Block = mutex_default_type, typename Allocator = safe_device_allocator<Block>>
STDGPU_DEVICE_ONLY reference stdgpu::mutex_array< Block, Allocator >::operator[] ( const index_t  n)

Returns a reference to the n-th mutex.

Parameters
[in]nThe position of the requested mutex
Returns
The n-th mutex
Precondition
0 <= n < size()