store

store#

stdgpu: stdgpu::atomic::store
stdgpu Latest
Efficient STL-like Data Structures on the GPU

◆ store() [2/2]

template<typename T , typename Allocator = safe_device_allocator<T>>
template<typename ExecutionPolicy , STDGPU_DETAIL_OVERLOAD_IF(is_execution_policy_v< remove_cvref_t< ExecutionPolicy > >) >
void stdgpu::atomic< T, Allocator >::store ( ExecutionPolicy &&  policy,
const T  desired,
const memory_order  order = memory_order_seq_cst 
)

Atomically replaces the current value with desired one.

Template Parameters
ExecutionPolicyThe type of the execution policy
Parameters
[in]policyThe execution policy
[in]desiredThe value to store to the atomic object
[in]orderThe memory order