store

store#

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

◆ store() [2/2]

template<typename T >
template<typename ExecutionPolicy , STDGPU_DETAIL_OVERLOAD_IF(is_execution_policy_v< remove_cvref_t< ExecutionPolicy > >) >
void stdgpu::atomic_ref< T >::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