DPC++ Runtime
Runtime libraries for oneAPI DPC++
cl::sycl::ext::oneapi::detail::atomic_ref_impl< T, DefaultOrder, DefaultScope, AddressSpace, typename detail::enable_if_t< std::is_integral< T >::value > > Class Template Reference

#include <sycl/ext/oneapi/atomic_ref.hpp>

Inheritance diagram for cl::sycl::ext::oneapi::detail::atomic_ref_impl< T, DefaultOrder, DefaultScope, AddressSpace, typename detail::enable_if_t< std::is_integral< T >::value > >:
Collaboration diagram for cl::sycl::ext::oneapi::detail::atomic_ref_impl< T, DefaultOrder, DefaultScope, AddressSpace, typename detail::enable_if_t< std::is_integral< T >::value > >:

Public Types

using value_type = T
 
using difference_type = value_type
 
- Public Types inherited from cl::sycl::detail::atomic_ref_base< T, DefaultOrder, DefaultScope, AddressSpace >
using value_type = T
 

Public Member Functions

T fetch_add (T operand, memory_order order=default_read_modify_write_order, memory_scope scope=default_scope) const noexcept
 
T operator+= (T operand) const noexcept
 
T operator++ (int) const noexcept
 
T operator++ () const noexcept
 
T fetch_sub (T operand, memory_order order=default_read_modify_write_order, memory_scope scope=default_scope) const noexcept
 
T operator-= (T operand) const noexcept
 
T operator-- (int) const noexcept
 
T operator-- () const noexcept
 
T fetch_and (T operand, memory_order order=default_read_modify_write_order, memory_scope scope=default_scope) const noexcept
 
T operator&= (T operand) const noexcept
 
T fetch_or (T operand, memory_order order=default_read_modify_write_order, memory_scope scope=default_scope) const noexcept
 
T operator|= (T operand) const noexcept
 
T fetch_xor (T operand, memory_order order=default_read_modify_write_order, memory_scope scope=default_scope) const noexcept
 
T operator^= (T operand) const noexcept
 
T fetch_min (T operand, memory_order order=default_read_modify_write_order, memory_scope scope=default_scope) const noexcept
 
T fetch_max (T operand, memory_order order=default_read_modify_write_order, memory_scope scope=default_scope) const noexcept
 
- Public Member Functions inherited from cl::sycl::detail::atomic_ref_base< T, DefaultOrder, DefaultScope, AddressSpace >
bool is_lock_free () const noexcept
 
 atomic_ref_base (T &ref)
 
 atomic_ref_base (const atomic_ref_base &ref) noexcept
 
atomic_ref_baseoperator= (const atomic_ref_base &)=delete
 
void store (T operand, memory_order order=default_write_order, memory_scope scope=default_scope) const noexcept
 
T operator= (T desired) const noexcept
 
T load (memory_order order=default_read_order, memory_scope scope=default_scope) const noexcept
 
 operator T () const noexcept
 
T exchange (T operand, memory_order order=default_read_modify_write_order, memory_scope scope=default_scope) const noexcept
 
bool compare_exchange_strong (T &expected, T desired, memory_order success, memory_order failure, memory_scope scope=default_scope) const noexcept
 
bool compare_exchange_strong (T &expected, T desired, memory_order order=default_read_modify_write_order, memory_scope scope=default_scope) const noexcept
 
bool compare_exchange_weak (T &expected, T desired, memory_order success, memory_order failure, memory_scope scope=default_scope) const noexcept
 
bool compare_exchange_weak (T &expected, T desired, memory_order order=default_read_modify_write_order, memory_scope scope=default_scope) const noexcept
 

Static Public Attributes

static constexpr size_t required_alignment = sizeof(T)
 
static constexpr bool is_always_lock_free
 
static constexpr memory_order default_read_order
 
static constexpr memory_order default_write_order
 
static constexpr memory_order default_read_modify_write_order = DefaultOrder
 
static constexpr memory_scope default_scope = DefaultScope
 
- Static Public Attributes inherited from cl::sycl::detail::atomic_ref_base< T, DefaultOrder, DefaultScope, AddressSpace >
static constexpr size_t required_alignment = sizeof(T)
 
static constexpr bool is_always_lock_free
 
static constexpr memory_order default_read_order
 
static constexpr memory_order default_write_order
 
static constexpr memory_order default_read_modify_write_order = DefaultOrder
 
static constexpr memory_scope default_scope = DefaultScope
 

Additional Inherited Members

- Protected Attributes inherited from cl::sycl::detail::atomic_ref_base< T, DefaultOrder, DefaultScope, AddressSpace >
std::atomic< T > * ptr
 

Detailed Description

template<typename T, memory_order DefaultOrder, memory_scope DefaultScope, access::address_space AddressSpace>
class cl::sycl::ext::oneapi::detail::atomic_ref_impl< T, DefaultOrder, DefaultScope, AddressSpace, typename detail::enable_if_t< std::is_integral< T >::value > >

Definition at line 268 of file atomic_ref.hpp.

Member Typedef Documentation

◆ difference_type

template<typename T , memory_order DefaultOrder, memory_scope DefaultScope, access::address_space AddressSpace>
using cl::sycl::ext::oneapi::detail::atomic_ref_impl< T, DefaultOrder, DefaultScope, AddressSpace, typename detail::enable_if_t< std::is_integral< T >::value > >::difference_type = value_type

Definition at line 274 of file atomic_ref.hpp.

◆ value_type

template<typename T , memory_order DefaultOrder, memory_scope DefaultScope, access::address_space AddressSpace>
using cl::sycl::ext::oneapi::detail::atomic_ref_impl< T, DefaultOrder, DefaultScope, AddressSpace, typename detail::enable_if_t< std::is_integral< T >::value > >::value_type = T

Definition at line 273 of file atomic_ref.hpp.

Member Function Documentation

◆ fetch_add()

template<typename T , memory_order DefaultOrder, memory_scope DefaultScope, access::address_space AddressSpace>
T cl::sycl::ext::oneapi::detail::atomic_ref_impl< T, DefaultOrder, DefaultScope, AddressSpace, typename detail::enable_if_t< std::is_integral< T >::value > >::fetch_add ( T  operand,
memory_order  order = default_read_modify_write_order,
memory_scope  scope = default_scope 
) const
inlinenoexcept

Definition at line 292 of file atomic_ref.hpp.

References cl::sycl::detail::getStdMemoryOrder().

◆ fetch_and()

template<typename T , memory_order DefaultOrder, memory_scope DefaultScope, access::address_space AddressSpace>
T cl::sycl::ext::oneapi::detail::atomic_ref_impl< T, DefaultOrder, DefaultScope, AddressSpace, typename detail::enable_if_t< std::is_integral< T >::value > >::fetch_and ( T  operand,
memory_order  order = default_read_modify_write_order,
memory_scope  scope = default_scope 
) const
inlinenoexcept

Definition at line 340 of file atomic_ref.hpp.

References cl::sycl::detail::getStdMemoryOrder().

◆ fetch_max()

template<typename T , memory_order DefaultOrder, memory_scope DefaultScope, access::address_space AddressSpace>
T cl::sycl::ext::oneapi::detail::atomic_ref_impl< T, DefaultOrder, DefaultScope, AddressSpace, typename detail::enable_if_t< std::is_integral< T >::value > >::fetch_max ( T  operand,
memory_order  order = default_read_modify_write_order,
memory_scope  scope = default_scope 
) const
inlinenoexcept

Definition at line 394 of file atomic_ref.hpp.

References cl::sycl::ext::oneapi::detail::getLoadOrder().

◆ fetch_min()

template<typename T , memory_order DefaultOrder, memory_scope DefaultScope, access::address_space AddressSpace>
T cl::sycl::ext::oneapi::detail::atomic_ref_impl< T, DefaultOrder, DefaultScope, AddressSpace, typename detail::enable_if_t< std::is_integral< T >::value > >::fetch_min ( T  operand,
memory_order  order = default_read_modify_write_order,
memory_scope  scope = default_scope 
) const
inlinenoexcept

Definition at line 380 of file atomic_ref.hpp.

References cl::sycl::ext::oneapi::detail::getLoadOrder().

◆ fetch_or()

template<typename T , memory_order DefaultOrder, memory_scope DefaultScope, access::address_space AddressSpace>
T cl::sycl::ext::oneapi::detail::atomic_ref_impl< T, DefaultOrder, DefaultScope, AddressSpace, typename detail::enable_if_t< std::is_integral< T >::value > >::fetch_or ( T  operand,
memory_order  order = default_read_modify_write_order,
memory_scope  scope = default_scope 
) const
inlinenoexcept

Definition at line 354 of file atomic_ref.hpp.

References cl::sycl::detail::getStdMemoryOrder().

◆ fetch_sub()

template<typename T , memory_order DefaultOrder, memory_scope DefaultScope, access::address_space AddressSpace>
T cl::sycl::ext::oneapi::detail::atomic_ref_impl< T, DefaultOrder, DefaultScope, AddressSpace, typename detail::enable_if_t< std::is_integral< T >::value > >::fetch_sub ( T  operand,
memory_order  order = default_read_modify_write_order,
memory_scope  scope = default_scope 
) const
inlinenoexcept

Definition at line 316 of file atomic_ref.hpp.

References cl::sycl::detail::getStdMemoryOrder().

◆ fetch_xor()

template<typename T , memory_order DefaultOrder, memory_scope DefaultScope, access::address_space AddressSpace>
T cl::sycl::ext::oneapi::detail::atomic_ref_impl< T, DefaultOrder, DefaultScope, AddressSpace, typename detail::enable_if_t< std::is_integral< T >::value > >::fetch_xor ( T  operand,
memory_order  order = default_read_modify_write_order,
memory_scope  scope = default_scope 
) const
inlinenoexcept

Definition at line 366 of file atomic_ref.hpp.

References cl::sycl::detail::getStdMemoryOrder().

◆ operator&=()

template<typename T , memory_order DefaultOrder, memory_scope DefaultScope, access::address_space AddressSpace>
T cl::sycl::ext::oneapi::detail::atomic_ref_impl< T, DefaultOrder, DefaultScope, AddressSpace, typename detail::enable_if_t< std::is_integral< T >::value > >::operator&= ( T  operand) const
inlinenoexcept

Definition at line 350 of file atomic_ref.hpp.

◆ operator++() [1/2]

template<typename T , memory_order DefaultOrder, memory_scope DefaultScope, access::address_space AddressSpace>
T cl::sycl::ext::oneapi::detail::atomic_ref_impl< T, DefaultOrder, DefaultScope, AddressSpace, typename detail::enable_if_t< std::is_integral< T >::value > >::operator++ ( ) const
inlinenoexcept

Definition at line 311 of file atomic_ref.hpp.

◆ operator++() [2/2]

template<typename T , memory_order DefaultOrder, memory_scope DefaultScope, access::address_space AddressSpace>
T cl::sycl::ext::oneapi::detail::atomic_ref_impl< T, DefaultOrder, DefaultScope, AddressSpace, typename detail::enable_if_t< std::is_integral< T >::value > >::operator++ ( int  ) const
inlinenoexcept

Definition at line 306 of file atomic_ref.hpp.

◆ operator+=()

template<typename T , memory_order DefaultOrder, memory_scope DefaultScope, access::address_space AddressSpace>
T cl::sycl::ext::oneapi::detail::atomic_ref_impl< T, DefaultOrder, DefaultScope, AddressSpace, typename detail::enable_if_t< std::is_integral< T >::value > >::operator+= ( T  operand) const
inlinenoexcept

Definition at line 302 of file atomic_ref.hpp.

◆ operator--() [1/2]

template<typename T , memory_order DefaultOrder, memory_scope DefaultScope, access::address_space AddressSpace>
T cl::sycl::ext::oneapi::detail::atomic_ref_impl< T, DefaultOrder, DefaultScope, AddressSpace, typename detail::enable_if_t< std::is_integral< T >::value > >::operator-- ( ) const
inlinenoexcept

Definition at line 335 of file atomic_ref.hpp.

◆ operator--() [2/2]

template<typename T , memory_order DefaultOrder, memory_scope DefaultScope, access::address_space AddressSpace>
T cl::sycl::ext::oneapi::detail::atomic_ref_impl< T, DefaultOrder, DefaultScope, AddressSpace, typename detail::enable_if_t< std::is_integral< T >::value > >::operator-- ( int  ) const
inlinenoexcept

Definition at line 330 of file atomic_ref.hpp.

◆ operator-=()

template<typename T , memory_order DefaultOrder, memory_scope DefaultScope, access::address_space AddressSpace>
T cl::sycl::ext::oneapi::detail::atomic_ref_impl< T, DefaultOrder, DefaultScope, AddressSpace, typename detail::enable_if_t< std::is_integral< T >::value > >::operator-= ( T  operand) const
inlinenoexcept

Definition at line 326 of file atomic_ref.hpp.

◆ operator^=()

template<typename T , memory_order DefaultOrder, memory_scope DefaultScope, access::address_space AddressSpace>
T cl::sycl::ext::oneapi::detail::atomic_ref_impl< T, DefaultOrder, DefaultScope, AddressSpace, typename detail::enable_if_t< std::is_integral< T >::value > >::operator^= ( T  operand) const
inlinenoexcept

Definition at line 376 of file atomic_ref.hpp.

◆ operator|=()

template<typename T , memory_order DefaultOrder, memory_scope DefaultScope, access::address_space AddressSpace>
T cl::sycl::ext::oneapi::detail::atomic_ref_impl< T, DefaultOrder, DefaultScope, AddressSpace, typename detail::enable_if_t< std::is_integral< T >::value > >::operator|= ( T  operand) const
inlinenoexcept

Definition at line 364 of file atomic_ref.hpp.

Member Data Documentation

◆ default_read_modify_write_order

template<typename T , memory_order DefaultOrder, memory_scope DefaultScope, access::address_space AddressSpace>
constexpr memory_order cl::sycl::ext::oneapi::detail::atomic_ref_impl< T, DefaultOrder, DefaultScope, AddressSpace, typename detail::enable_if_t< std::is_integral< T >::value > >::default_read_modify_write_order = DefaultOrder
staticconstexpr

Definition at line 282 of file atomic_ref.hpp.

◆ default_read_order

template<typename T , memory_order DefaultOrder, memory_scope DefaultScope, access::address_space AddressSpace>
constexpr memory_order cl::sycl::ext::oneapi::detail::atomic_ref_impl< T, DefaultOrder, DefaultScope, AddressSpace, typename detail::enable_if_t< std::is_integral< T >::value > >::default_read_order
staticconstexpr
Initial value:
=
detail::memory_order_traits<DefaultOrder>::read_order

Definition at line 278 of file atomic_ref.hpp.

◆ default_scope

template<typename T , memory_order DefaultOrder, memory_scope DefaultScope, access::address_space AddressSpace>
constexpr memory_scope cl::sycl::ext::oneapi::detail::atomic_ref_impl< T, DefaultOrder, DefaultScope, AddressSpace, typename detail::enable_if_t< std::is_integral< T >::value > >::default_scope = DefaultScope
staticconstexpr

Definition at line 283 of file atomic_ref.hpp.

◆ default_write_order

template<typename T , memory_order DefaultOrder, memory_scope DefaultScope, access::address_space AddressSpace>
constexpr memory_order cl::sycl::ext::oneapi::detail::atomic_ref_impl< T, DefaultOrder, DefaultScope, AddressSpace, typename detail::enable_if_t< std::is_integral< T >::value > >::default_write_order
staticconstexpr
Initial value:
=
detail::memory_order_traits<DefaultOrder>::write_order

Definition at line 280 of file atomic_ref.hpp.

◆ is_always_lock_free

template<typename T , memory_order DefaultOrder, memory_scope DefaultScope, access::address_space AddressSpace>
constexpr bool cl::sycl::ext::oneapi::detail::atomic_ref_impl< T, DefaultOrder, DefaultScope, AddressSpace, typename detail::enable_if_t< std::is_integral< T >::value > >::is_always_lock_free
staticconstexpr
Initial value:

Definition at line 276 of file atomic_ref.hpp.

◆ required_alignment

template<typename T , memory_order DefaultOrder, memory_scope DefaultScope, access::address_space AddressSpace>
constexpr size_t cl::sycl::ext::oneapi::detail::atomic_ref_impl< T, DefaultOrder, DefaultScope, AddressSpace, typename detail::enable_if_t< std::is_integral< T >::value > >::required_alignment = sizeof(T)
staticconstexpr

Definition at line 275 of file atomic_ref.hpp.


The documentation for this class was generated from the following file:
cl::sycl::detail::IsValidAtomicRefType::value
static constexpr bool value
Definition: atomic_ref.hpp:33