DPC++ Runtime
Runtime libraries for oneAPI DPC++
cl::sycl::ext::oneapi::atomic_accessor< DataT, Dimensions, DefaultOrder, DefaultScope, AccessTarget, IsPlaceholder > Class Template Reference

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

Inheritance diagram for cl::sycl::ext::oneapi::atomic_accessor< DataT, Dimensions, DefaultOrder, DefaultScope, AccessTarget, IsPlaceholder >:
Collaboration diagram for cl::sycl::ext::oneapi::atomic_accessor< DataT, Dimensions, DefaultOrder, DefaultScope, AccessTarget, IsPlaceholder >:

Public Types

using value_type = DataT
 
using reference = atomic_ref< DataT, DefaultOrder, DefaultScope, AccessorT::AS >
 
- Public Types inherited from cl::sycl::accessor< DataT, Dimensions, access::mode::read_write, access::target::device, access::placeholder::false_t, ext::oneapi::accessor_property_list<> >
using value_type = DataT
 
using reference = DataT &
 
using const_reference = const DataT &
 

Public Member Functions

template<int Dims = Dimensions>
 operator typename detail::enable_if_t< Dims==0, reference > () const
 
template<int Dims = Dimensions>
detail::enable_if_t<(Dims > 0), referenceoperator[] (id< Dimensions > Index) const
 
template<int Dims = Dimensions>
detail::enable_if_t< Dims==1, referenceoperator[] (size_t Index) const
 
- Public Member Functions inherited from cl::sycl::accessor< DataT, Dimensions, access::mode::read_write, access::target::device, access::placeholder::false_t, ext::oneapi::accessor_property_list<> >
 accessor (buffer< T, 1, AllocatorT > &BufferRef, const property_list &PropertyList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
 accessor (buffer< T, 1, AllocatorT > &BufferRef, const ext::oneapi::accessor_property_list< PropTypes... > &PropertyList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
 accessor (buffer< T, 1, AllocatorT > &BufferRef, handler &CommandGroupHandler, const property_list &PropertyList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
 accessor (buffer< T, 1, AllocatorT > &BufferRef, handler &CommandGroupHandler, const ext::oneapi::accessor_property_list< PropTypes... > &PropertyList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
 accessor (buffer< T, Dims, AllocatorT > &BufferRef, const property_list &PropertyList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
 accessor (buffer< T, Dims, AllocatorT > &BufferRef, const ext::oneapi::accessor_property_list< PropTypes... > &PropertyList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
 accessor (buffer< T, Dims, AllocatorT > &BufferRef, handler &CommandGroupHandler, const property_list &PropertyList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
 accessor (buffer< T, Dims, AllocatorT > &BufferRef, handler &CommandGroupHandler, const ext::oneapi::accessor_property_list< PropTypes... > &PropertyList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
 accessor (buffer< T, Dims, AllocatorT > &BufferRef, range< Dimensions > AccessRange, const property_list &PropertyList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
 accessor (buffer< T, Dims, AllocatorT > &BufferRef, range< Dimensions > AccessRange, const ext::oneapi::accessor_property_list< PropTypes... > &PropertyList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
 accessor (buffer< T, Dims, AllocatorT > &BufferRef, handler &CommandGroupHandler, range< Dimensions > AccessRange, const property_list &PropertyList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
 accessor (buffer< T, Dims, AllocatorT > &BufferRef, handler &CommandGroupHandler, range< Dimensions > AccessRange, const ext::oneapi::accessor_property_list< PropTypes... > &PropertyList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
 accessor (buffer< T, Dims, AllocatorT > &BufferRef, range< Dimensions > AccessRange, id< Dimensions > AccessOffset, const property_list &PropertyList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
 accessor (buffer< T, Dims, AllocatorT > &BufferRef, range< Dimensions > AccessRange, id< Dimensions > AccessOffset, const ext::oneapi::accessor_property_list< PropTypes... > &PropertyList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
 accessor (buffer< T, Dims, AllocatorT > &BufferRef, handler &CommandGroupHandler, range< Dimensions > AccessRange, id< Dimensions > AccessOffset, const property_list &PropertyList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
 accessor (buffer< T, Dims, AllocatorT > &BufferRef, handler &CommandGroupHandler, range< Dimensions > AccessRange, id< Dimensions > AccessOffset, const ext::oneapi::accessor_property_list< PropTypes... > &PropertyList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
 accessor (const accessor< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, ext::oneapi::accessor_property_list< NewPropsT... >> &Other, const detail::code_location CodeLoc=detail::code_location::current())
 
constexpr bool is_placeholder () const
 
size_t get_size () const
 
 __SYCL2020_DEPRECATED ("get_count() is deprecated, please use size() instead") size_t get_count() const
 
size_t size () const noexcept
 
range< Dimensions > get_range () const
 
id< Dimensions > get_offset () const
 
 operator RefType () const
 
 operator ConstRefType () const
 
RefType operator[] (id< Dimensions > Index) const
 
detail::enable_if_t<(Dims > 0) &&IsAccessReadOnly, ConstRefTypeoperator[] (id< Dimensions > Index) const
 
detail::enable_if_t<(Dims > 0) &&AccessMode==access::mode::atomic, atomic< DataT, AS > > operator[] (id< Dimensions > Index) const
 
detail::enable_if_t< Dims==1 &&AccessMode==access::mode::atomic, atomic< DataT, AS > > operator[] (size_t Index) const
 
AccessorCommonT::template AccessorSubscript< Dims - 1 > operator[] (size_t Index) const
 
 operator typename detail::enable_if_t< Dims==0 &&AccessMode==access::mode::atomic, atomic< DataT, AS > > () const
 
DataT * get_pointer () const
 
global_ptr< DataT > get_pointer () const
 
constant_ptr< DataT > get_pointer () const
 
bool operator== (const accessor &Rhs) const
 
bool operator!= (const accessor &Rhs) const
 

Static Protected Attributes

constexpr static int AdjustedDim
 
- Static Protected Attributes inherited from cl::sycl::accessor< DataT, Dimensions, access::mode::read_write, access::target::device, access::placeholder::false_t, ext::oneapi::accessor_property_list<> >
constexpr static int AdjustedDim
 
constexpr static access::address_space AS
 
constexpr static bool IsAccessAnyWrite
 
constexpr static bool IsAccessReadOnly
 
constexpr static bool IsConstantBuf
 
constexpr static bool IsGlobalBuf
 
constexpr static bool IsHostBuf
 
constexpr static bool IsPlaceH
 

Additional Inherited Members

- Protected Types inherited from cl::sycl::accessor< DataT, Dimensions, access::mode::read_write, access::target::device, access::placeholder::false_t, ext::oneapi::accessor_property_list<> >
using AccessorCommonT = detail::accessor_common< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, ext::oneapi::accessor_property_list<> >
 
using AccessorSubscript = typename AccessorCommonT::template AccessorSubscript< Dims >
 
using ConcreteASPtrType = typename detail::DecoratedType< DataT, AS >::type *
 
using RefType = detail::const_if_const_AS< AS, DataT > &
 
using ConstRefType = const DataT &
 
using PtrType = detail::const_if_const_AS< AS, DataT > *
 
- Protected Member Functions inherited from cl::sycl::accessor< DataT, Dimensions, access::mode::read_write, access::target::device, access::placeholder::false_t, ext::oneapi::accessor_property_list<> >
size_t getLinearIndex (id< Dims > Id) const
 
PtrType getQualifiedPtr () const
 
range< 3 > & getAccessRange ()
 
const range< 3 > & getAccessRange () const
 
range< 3 > & getMemoryRange ()
 
const range< 3 > & getMemoryRange () const
 
id< 3 > & getOffset ()
 
const id< 3 > & getOffset () const
 
- Static Protected Member Functions inherited from cl::sycl::accessor< DataT, Dimensions, access::mode::read_write, access::target::device, access::placeholder::false_t, ext::oneapi::accessor_property_list<> >
static constexpr bool IsSameAsBuffer ()
 
static access::mode getAdjustedMode (const ext::oneapi::accessor_property_list<> &PropertyList)
 
- Protected Attributes inherited from cl::sycl::accessor< DataT, Dimensions, access::mode::read_write, access::target::device, access::placeholder::false_t, ext::oneapi::accessor_property_list<> >
char padding [sizeof(detail::AccessorImplDevice< AdjustedDim >)+sizeof(PtrType) - sizeof(detail::AccessorBaseHost)]
 

Detailed Description

template<typename DataT, int Dimensions, memory_order DefaultOrder, memory_scope DefaultScope, access::target AccessTarget = access::target::device, access::placeholder IsPlaceholder = access::placeholder::false_t>
class cl::sycl::ext::oneapi::atomic_accessor< DataT, Dimensions, DefaultOrder, DefaultScope, AccessTarget, IsPlaceholder >

Definition at line 47 of file atomic_accessor.hpp.

Member Typedef Documentation

◆ reference

template<typename DataT , int Dimensions, memory_order DefaultOrder, memory_scope DefaultScope, access::target AccessTarget = access::target::device, access::placeholder IsPlaceholder = access::placeholder::false_t>
using cl::sycl::ext::oneapi::atomic_accessor< DataT, Dimensions, DefaultOrder, DefaultScope, AccessTarget, IsPlaceholder >::reference = atomic_ref<DataT, DefaultOrder, DefaultScope, AccessorT::AS>

Definition at line 68 of file atomic_accessor.hpp.

◆ value_type

template<typename DataT , int Dimensions, memory_order DefaultOrder, memory_scope DefaultScope, access::target AccessTarget = access::target::device, access::placeholder IsPlaceholder = access::placeholder::false_t>
using cl::sycl::ext::oneapi::atomic_accessor< DataT, Dimensions, DefaultOrder, DefaultScope, AccessTarget, IsPlaceholder >::value_type = DataT

Definition at line 66 of file atomic_accessor.hpp.

Member Function Documentation

◆ operator typename detail::enable_if_t< Dims==0, reference >()

template<typename DataT , int Dimensions, memory_order DefaultOrder, memory_scope DefaultScope, access::target AccessTarget = access::target::device, access::placeholder IsPlaceholder = access::placeholder::false_t>
template<int Dims = Dimensions>
cl::sycl::ext::oneapi::atomic_accessor< DataT, Dimensions, DefaultOrder, DefaultScope, AccessTarget, IsPlaceholder >::operator typename detail::enable_if_t< Dims==0, reference > ( ) const
inline

Definition at line 91 of file atomic_accessor.hpp.

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

◆ operator[]() [1/2]

template<typename DataT , int Dimensions, memory_order DefaultOrder, memory_scope DefaultScope, access::target AccessTarget = access::target::device, access::placeholder IsPlaceholder = access::placeholder::false_t>
template<int Dims = Dimensions>
detail::enable_if_t<(Dims > 0), reference> cl::sycl::ext::oneapi::atomic_accessor< DataT, Dimensions, DefaultOrder, DefaultScope, AccessTarget, IsPlaceholder >::operator[] ( id< Dimensions Index) const
inline

Definition at line 98 of file atomic_accessor.hpp.

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

◆ operator[]() [2/2]

template<typename DataT , int Dimensions, memory_order DefaultOrder, memory_scope DefaultScope, access::target AccessTarget = access::target::device, access::placeholder IsPlaceholder = access::placeholder::false_t>
template<int Dims = Dimensions>
detail::enable_if_t<Dims == 1, reference> cl::sycl::ext::oneapi::atomic_accessor< DataT, Dimensions, DefaultOrder, DefaultScope, AccessTarget, IsPlaceholder >::operator[] ( size_t  Index) const
inline

Definition at line 105 of file atomic_accessor.hpp.

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

Member Data Documentation

◆ AdjustedDim

template<typename DataT , int Dimensions, memory_order DefaultOrder, memory_scope DefaultScope, access::target AccessTarget = access::target::device, access::placeholder IsPlaceholder = access::placeholder::false_t>
constexpr static int cl::sycl::accessor< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::AdjustedDim
staticconstexprprotected

Definition at line 813 of file accessor.hpp.


The documentation for this class was generated from the following file: