DPC++ Runtime
Runtime libraries for oneAPI Data Parallel C++
atomic.hpp File Reference
#include <CL/__spirv/spirv_ops.hpp>
#include <CL/sycl/access/access.hpp>
#include <CL/sycl/detail/helpers.hpp>
#include <CL/sycl/memory_enums.hpp>
#include <atomic>
#include <type_traits>
Include dependency graph for atomic.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  cl::sycl::multi_ptr< ElementType, Space >
 Provides constructors for address space qualified and non address space qualified pointers to allow interoperability between plain C++ and OpenCL C. More...
 
struct  cl::sycl::detail::IsValidAtomicType< T >
 
struct  cl::sycl::detail::IsValidAtomicAddressSpace< AS >
 
struct  cl::sycl::detail::GetSpirvMemoryScope< AS >
 
struct  cl::sycl::detail::GetSpirvMemoryScope< access::address_space::global_space >
 
struct  cl::sycl::detail::GetSpirvMemoryScope< access::address_space::global_device_space >
 
struct  cl::sycl::detail::GetSpirvMemoryScope< access::address_space::local_space >
 
class  cl::sycl::atomic< T, addressSpace >
 

Namespaces

 cl
 We provide new interfaces for matrix muliply in this patch:
 
 cl::sycl
 
 cl::sycl::detail
 

Macros

#define __SYCL_STATIC_ASSERT_NOT_FLOAT(T)
 

Typedefs

using cl::sycl::detail::memory_order = cl::sycl::memory_order
 

Functions

static std::memory_order cl::sycl::detail::getStdMemoryOrder (__spv::MemorySemanticsMask::Flag)
 
template<typename T >
void __spirv_AtomicStore (std::atomic< T > *Ptr, __spv::Scope::Flag, __spv::MemorySemanticsMask::Flag MS, T V)
 
template<typename T >
T __spirv_AtomicLoad (const std::atomic< T > *Ptr, __spv::Scope::Flag, __spv::MemorySemanticsMask::Flag MS)
 
template<typename T >
T __spirv_AtomicExchange (std::atomic< T > *Ptr, __spv::Scope::Flag, __spv::MemorySemanticsMask::Flag MS, T V)
 
template<typename T >
T __spirv_AtomicIAdd (std::atomic< T > *Ptr, __spv::Scope::Flag, __spv::MemorySemanticsMask::Flag MS, T V)
 
template<typename T >
T __spirv_AtomicISub (std::atomic< T > *Ptr, __spv::Scope::Flag, __spv::MemorySemanticsMask::Flag MS, T V)
 
template<typename T >
T __spirv_AtomicAnd (std::atomic< T > *Ptr, __spv::Scope::Flag, __spv::MemorySemanticsMask::Flag MS, T V)
 
template<typename T >
T __spirv_AtomicOr (std::atomic< T > *Ptr, __spv::Scope::Flag, __spv::MemorySemanticsMask::Flag MS, T V)
 
template<typename T >
T __spirv_AtomicXor (std::atomic< T > *Ptr, __spv::Scope::Flag, __spv::MemorySemanticsMask::Flag MS, T V)
 
template<typename T >
T __spirv_AtomicMin (std::atomic< T > *Ptr, __spv::Scope::Flag, __spv::MemorySemanticsMask::Flag MS, T V)
 
template<typename T >
T __spirv_AtomicMax (std::atomic< T > *Ptr, __spv::Scope::Flag, __spv::MemorySemanticsMask::Flag MS, T V)
 
template<typename T , access::address_space addressSpace>
void cl::sycl::atomic_store (atomic< T, addressSpace > Object, T Operand, memory_order MemoryOrder=memory_order::relaxed)
 
template<typename T , access::address_space addressSpace>
T cl::sycl::atomic_load (atomic< T, addressSpace > Object, memory_order MemoryOrder=memory_order::relaxed)
 
template<typename T , access::address_space addressSpace>
T cl::sycl::atomic_exchange (atomic< T, addressSpace > Object, T Operand, memory_order MemoryOrder=memory_order::relaxed)
 
template<typename T , access::address_space addressSpace>
bool cl::sycl::atomic_compare_exchange_strong (atomic< T, addressSpace > Object, T &Expected, T Desired, memory_order SuccessOrder=memory_order::relaxed, memory_order FailOrder=memory_order::relaxed)
 
template<typename T , access::address_space addressSpace>
T cl::sycl::atomic_fetch_add (atomic< T, addressSpace > Object, T Operand, memory_order MemoryOrder=memory_order::relaxed)
 
template<typename T , access::address_space addressSpace>
T cl::sycl::atomic_fetch_sub (atomic< T, addressSpace > Object, T Operand, memory_order MemoryOrder=memory_order::relaxed)
 
template<typename T , access::address_space addressSpace>
T cl::sycl::atomic_fetch_and (atomic< T, addressSpace > Object, T Operand, memory_order MemoryOrder=memory_order::relaxed)
 
template<typename T , access::address_space addressSpace>
T cl::sycl::atomic_fetch_or (atomic< T, addressSpace > Object, T Operand, memory_order MemoryOrder=memory_order::relaxed)
 
template<typename T , access::address_space addressSpace>
T cl::sycl::atomic_fetch_xor (atomic< T, addressSpace > Object, T Operand, memory_order MemoryOrder=memory_order::relaxed)
 
template<typename T , access::address_space addressSpace>
T cl::sycl::atomic_fetch_min (atomic< T, addressSpace > Object, T Operand, memory_order MemoryOrder=memory_order::relaxed)
 
template<typename T , access::address_space addressSpace>
T cl::sycl::atomic_fetch_max (atomic< T, addressSpace > Object, T Operand, memory_order MemoryOrder=memory_order::relaxed)
 

Macro Definition Documentation

◆ __SYCL_STATIC_ASSERT_NOT_FLOAT

#define __SYCL_STATIC_ASSERT_NOT_FLOAT (   T)
Value:
static_assert(!std::is_same<T, float>::value, \
"SYCL atomic function not available for float type")

Definition at line 23 of file atomic.hpp.

Function Documentation

◆ __spirv_AtomicAnd()

template<typename T >
T __spirv_AtomicAnd ( std::atomic< T > *  Ptr,
__spv::Scope::Flag  ,
__spv::MemorySemanticsMask::Flag  MS,
T  V 
)

◆ __spirv_AtomicExchange()

template<typename T >
T __spirv_AtomicExchange ( std::atomic< T > *  Ptr,
__spv::Scope::Flag  ,
__spv::MemorySemanticsMask::Flag  MS,
T  V 
)

◆ __spirv_AtomicIAdd()

template<typename T >
T __spirv_AtomicIAdd ( std::atomic< T > *  Ptr,
__spv::Scope::Flag  ,
__spv::MemorySemanticsMask::Flag  MS,
T  V 
)

◆ __spirv_AtomicISub()

template<typename T >
T __spirv_AtomicISub ( std::atomic< T > *  Ptr,
__spv::Scope::Flag  ,
__spv::MemorySemanticsMask::Flag  MS,
T  V 
)

◆ __spirv_AtomicLoad()

template<typename T >
T __spirv_AtomicLoad ( const std::atomic< T > *  Ptr,
__spv::Scope::Flag  ,
__spv::MemorySemanticsMask::Flag  MS 
)

◆ __spirv_AtomicMax()

template<typename T >
T __spirv_AtomicMax ( std::atomic< T > *  Ptr,
__spv::Scope::Flag  ,
__spv::MemorySemanticsMask::Flag  MS,
T  V 
)

◆ __spirv_AtomicMin()

template<typename T >
T __spirv_AtomicMin ( std::atomic< T > *  Ptr,
__spv::Scope::Flag  ,
__spv::MemorySemanticsMask::Flag  MS,
T  V 
)

◆ __spirv_AtomicOr()

template<typename T >
T __spirv_AtomicOr ( std::atomic< T > *  Ptr,
__spv::Scope::Flag  ,
__spv::MemorySemanticsMask::Flag  MS,
T  V 
)

◆ __spirv_AtomicStore()

template<typename T >
void __spirv_AtomicStore ( std::atomic< T > *  Ptr,
__spv::Scope::Flag  ,
__spv::MemorySemanticsMask::Flag  MS,
T  V 
)

◆ __spirv_AtomicXor()

template<typename T >
T __spirv_AtomicXor ( std::atomic< T > *  Ptr,
__spv::Scope::Flag  ,
__spv::MemorySemanticsMask::Flag  MS,
T  V 
)