DPC++ Runtime
Runtime libraries for oneAPI DPC++
sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT > Class Template Reference

Buffer accessor. More...

#include <sycl/accessor.hpp>

Inheritance diagram for sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >:
Collaboration diagram for sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >:

Public Types

using value_type = DataT
 
using reference = DataT &
 
using const_reference = const DataT &
 

Public Member Functions

template<int Dims = Dimensions, typename = std::enable_if_t<Dims == 0>>
 local_accessor_base (handler &, const detail::code_location CodeLoc=detail::code_location::current())
 
template<int Dims = Dimensions, typename = std::enable_if_t<Dims == 0>>
 local_accessor_base (handler &, const property_list &propList, const detail::code_location CodeLoc=detail::code_location::current())
 
template<int Dims = Dimensions, typename = std::enable_if_t<(Dims > 0)>>
 local_accessor_base (range< Dimensions > AllocationSize, handler &, const detail::code_location CodeLoc=detail::code_location::current())
 
template<int Dims = Dimensions, typename = std::enable_if_t<(Dims > 0)>>
 local_accessor_base (range< Dimensions > AllocationSize, handler &, const property_list &propList, const detail::code_location CodeLoc=detail::code_location::current())
 
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
 
template<int Dims = Dimensions, typename = std::enable_if_t<(Dims > 0)>>
range< Dims > get_range () const
 
template<int Dims = Dimensions, typename = std::enable_if_t<Dims == 0 && IsAccessAnyWrite>>
 operator RefType () const
 
template<int Dims = Dimensions, typename = std::enable_if_t<(Dims > 0) && IsAccessAnyWrite>>
RefType operator[] (id< Dimensions > Index) const
 
template<int Dims = Dimensions, typename = std::enable_if_t<Dims == 1 && IsAccessAnyWrite>>
RefType operator[] (size_t Index) const
 
template<int Dims = Dimensions>
 operator typename std::enable_if_t< Dims==0 &&AccessMode==access::mode::atomic, atomic< DataT, AS >> () const
 
template<int Dims = Dimensions>
std::enable_if_t<(Dims > 0) &&AccessMode==access::mode::atomic, atomic< DataT, AS > > operator[] (id< Dimensions > Index) const
 
template<int Dims = Dimensions>
std::enable_if_t< Dims==1 &&AccessMode==access::mode::atomic, atomic< DataT, AS > > operator[] (size_t Index) const
 
template<int Dims = Dimensions, typename = std::enable_if_t<(Dims > 1)>>
AccessorCommonT::template AccessorSubscript< Dims - 1, local_accessor_base< DataT, Dimensions, AccessMode, IsPlaceholder > > operator[] (size_t Index) const
 
local_ptr< DataT > get_pointer () const
 
bool operator== (const local_accessor_base &Rhs) const
 
bool operator!= (const local_accessor_base &Rhs) const
 
- Public Member Functions inherited from sycl::_V1::detail::LocalAccessorBaseHost
 LocalAccessorBaseHost (sycl::range< 3 > Size, int Dims, int ElemSize, const property_list &PropertyList={})
 
sycl::range< 3 > & getSize ()
 
const sycl::range< 3 > & getSize () const
 
void * getPtr ()
 
void * getPtr () const
 
int getNumOfDims ()
 
int getElementSize ()
 
const property_listgetPropList () const
 

Protected Types

using AccessorCommonT = detail::accessor_common< DataT, Dimensions, AccessMode, access::target::local, IsPlaceholder >
 
template<int Dims>
using AccessorSubscript = typename AccessorCommonT::template AccessorSubscript< Dims, local_accessor_base< DataT, Dimensions, AccessMode, IsPlaceholder > >
 
using ConcreteASPtrType = typename detail::DecoratedType< DataT, AS >::type *
 
using RefType = detail::const_if_const_AS< AS, DataT > &
 
using PtrType = detail::const_if_const_AS< AS, DataT > *
 
- Protected Types inherited from sycl::_V1::detail::accessor_common< DataT, Dimensions, AccessMode, access::target::local, IsPlaceholder >
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

 local_accessor_base (const detail::LocalAccessorImplPtr &Impl)
 
PtrType getQualifiedPtr () const
 
void * getPtr ()
 
void * getPtr () const
 
const range< 3 > & getSize () const
 
range< 3 > & getSize ()
 
void GDBMethodsAnchor ()
 
template<int Dims = AdjustedDim>
size_t getLinearIndex (id< Dims > Id) const
 
- Protected Member Functions inherited from sycl::_V1::detail::LocalAccessorBaseHost
 LocalAccessorBaseHost (const LocalAccessorImplPtr &Impl)
 
template<class Obj >
decltype(Obj::impl) friend getSyclObjImpl (const Obj &SyclObject)
 

Protected Attributes

char padding [sizeof(detail::LocalAccessorBaseDevice< AdjustedDim >)+sizeof(PtrType) - sizeof(detail::LocalAccessorBaseHost)]
 
- Protected Attributes inherited from sycl::_V1::detail::LocalAccessorBaseHost
LocalAccessorImplPtr impl
 

Static Protected Attributes

constexpr static int AdjustedDim = Dimensions == 0 ? 1 : Dimensions
 
- Static Protected Attributes inherited from sycl::_V1::detail::accessor_common< DataT, Dimensions, AccessMode, access::target::local, IsPlaceholder >
constexpr static bool IsPlaceH
 
constexpr static access::address_space AS
 
constexpr static bool IsHostBuf
 
constexpr static bool IsGlobalBuf
 
constexpr static bool IsConstantBuf
 
constexpr static bool IsAccessAnyWrite
 
constexpr static bool IsAccessReadOnly
 
constexpr static bool IsAccessReadWrite
 
constexpr static bool IsAccessAtomic
 

Friends

template<class T >
detail::createSyclObjFromImpl (decltype(T::impl) ImplObj)
 

Detailed Description

template<typename DataT, int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT>
class sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >

Buffer accessor.

See also
buffer Local accessor

Definition at line 2409 of file accessor.hpp.

Member Typedef Documentation

◆ AccessorCommonT

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
using sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::AccessorCommonT = detail::accessor_common<DataT, Dimensions, AccessMode, access::target::local, IsPlaceholder>
protected

Definition at line 2418 of file accessor.hpp.

◆ AccessorSubscript

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
template<int Dims>
using sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::AccessorSubscript = typename AccessorCommonT::template AccessorSubscript< Dims, local_accessor_base<DataT, Dimensions, AccessMode, IsPlaceholder> >
protected

Definition at line 2425 of file accessor.hpp.

◆ ConcreteASPtrType

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
using sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::ConcreteASPtrType = typename detail::DecoratedType<DataT, AS>::type *
protected

Definition at line 2430 of file accessor.hpp.

◆ const_reference

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
using sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::const_reference = const DataT &

Definition at line 2504 of file accessor.hpp.

◆ PtrType

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
using sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::PtrType = detail::const_if_const_AS<AS, DataT> *
protected

Definition at line 2433 of file accessor.hpp.

◆ reference

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
using sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::reference = DataT &

Definition at line 2503 of file accessor.hpp.

◆ RefType

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
using sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::RefType = detail::const_if_const_AS<AS, DataT> &
protected

Definition at line 2432 of file accessor.hpp.

◆ value_type

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
using sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::value_type = DataT

Definition at line 2502 of file accessor.hpp.

Constructor & Destructor Documentation

◆ local_accessor_base() [1/5]

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::local_accessor_base ( const detail::LocalAccessorImplPtr Impl)
inlineprotected

Definition at line 2459 of file accessor.hpp.

◆ local_accessor_base() [2/5]

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
template<int Dims = Dimensions, typename = std::enable_if_t<Dims == 0>>
sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::local_accessor_base ( handler ,
const detail::code_location  CodeLoc = detail::code_location::current() 
)
inline

Definition at line 2507 of file accessor.hpp.

◆ local_accessor_base() [3/5]

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
template<int Dims = Dimensions, typename = std::enable_if_t<Dims == 0>>
sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::local_accessor_base ( handler ,
const property_list propList,
const detail::code_location  CodeLoc = detail::code_location::current() 
)
inline

Definition at line 2520 of file accessor.hpp.

◆ local_accessor_base() [4/5]

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
template<int Dims = Dimensions, typename = std::enable_if_t<(Dims > 0)>>
sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::local_accessor_base ( range< Dimensions AllocationSize,
handler ,
const detail::code_location  CodeLoc = detail::code_location::current() 
)
inline

Definition at line 2537 of file accessor.hpp.

◆ local_accessor_base() [5/5]

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
template<int Dims = Dimensions, typename = std::enable_if_t<(Dims > 0)>>
sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::local_accessor_base ( range< Dimensions AllocationSize,
handler ,
const property_list propList,
const detail::code_location  CodeLoc = detail::code_location::current() 
)
inline

Definition at line 2553 of file accessor.hpp.

Member Function Documentation

◆ __SYCL2020_DEPRECATED()

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::__SYCL2020_DEPRECATED ( "get_count() is  deprecated,
please use size() instead  
) const
inline

Definition at line 2572 of file accessor.hpp.

◆ GDBMethodsAnchor()

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
void sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::GDBMethodsAnchor ( )
inlineprotected

Definition at line 2478 of file accessor.hpp.

◆ get_pointer()

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
local_ptr<DataT> sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::get_pointer ( ) const
inline

Definition at line 2633 of file accessor.hpp.

◆ get_range()

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
template<int Dims = Dimensions, typename = std::enable_if_t<(Dims > 0)>>
range<Dims> sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::get_range ( ) const
inline

Definition at line 2577 of file accessor.hpp.

◆ get_size()

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
size_t sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::get_size ( ) const
inline

Definition at line 2570 of file accessor.hpp.

◆ getLinearIndex()

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
template<int Dims = AdjustedDim>
size_t sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::getLinearIndex ( id< Dims >  Id) const
inlineprotected

Definition at line 2491 of file accessor.hpp.

◆ getPtr() [1/2]

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
void* sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::getPtr ( )
inlineprotected

Definition at line 2470 of file accessor.hpp.

◆ getPtr() [2/2]

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
void* sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::getPtr ( ) const
inlineprotected

Definition at line 2471 of file accessor.hpp.

◆ getQualifiedPtr()

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
PtrType sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::getQualifiedPtr ( ) const
inlineprotected

Definition at line 2466 of file accessor.hpp.

◆ getSize() [1/2]

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
range<3>& sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::getSize ( )
inlineprotected

Definition at line 2475 of file accessor.hpp.

◆ getSize() [2/2]

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
const range<3>& sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::getSize ( ) const
inlineprotected

Definition at line 2472 of file accessor.hpp.

◆ operator RefType()

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
template<int Dims = Dimensions, typename = std::enable_if_t<Dims == 0 && IsAccessAnyWrite>>
sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::operator RefType ( ) const
inline

Definition at line 2583 of file accessor.hpp.

◆ operator typename std::enable_if_t< Dims==0 &&AccessMode==access::mode::atomic, atomic< DataT, AS >>()

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
template<int Dims = Dimensions>
sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::operator typename std::enable_if_t< Dims==0 &&AccessMode==access::mode::atomic, atomic< DataT, AS >> ( ) const
inline

Definition at line 2601 of file accessor.hpp.

◆ operator!=()

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
bool sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::operator!= ( const local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT > &  Rhs) const
inline

Definition at line 2640 of file accessor.hpp.

◆ operator==()

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
bool sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::operator== ( const local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT > &  Rhs) const
inline

Definition at line 2637 of file accessor.hpp.

References sycl::_V1::detail::LocalAccessorBaseHost::impl.

◆ operator[]() [1/5]

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
template<int Dims = Dimensions, typename = std::enable_if_t<(Dims > 0) && IsAccessAnyWrite>>
RefType sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::operator[] ( id< Dimensions Index) const
inline

Definition at line 2589 of file accessor.hpp.

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

◆ operator[]() [2/5]

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
template<int Dims = Dimensions>
std::enable_if_t<(Dims > 0) && AccessMode == access::mode::atomic, atomic<DataT, AS> > sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::operator[] ( id< Dimensions Index) const
inline

Definition at line 2611 of file accessor.hpp.

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

◆ operator[]() [3/5]

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
template<int Dims = Dimensions, typename = std::enable_if_t<Dims == 1 && IsAccessAnyWrite>>
RefType sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::operator[] ( size_t  Index) const
inline

Definition at line 2596 of file accessor.hpp.

◆ operator[]() [4/5]

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
template<int Dims = Dimensions>
std::enable_if_t<Dims == 1 && AccessMode == access::mode::atomic, atomic<DataT, AS> > sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::operator[] ( size_t  Index) const
inline

Definition at line 2620 of file accessor.hpp.

◆ operator[]() [5/5]

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
template<int Dims = Dimensions, typename = std::enable_if_t<(Dims > 1)>>
AccessorCommonT::template AccessorSubscript< Dims - 1, local_accessor_base<DataT, Dimensions, AccessMode, IsPlaceholder> > sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::operator[] ( size_t  Index) const
inline

Definition at line 2629 of file accessor.hpp.

◆ size()

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
size_t sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::size ( ) const
inlinenoexcept

Definition at line 2574 of file accessor.hpp.

Friends And Related Function Documentation

◆ detail::createSyclObjFromImpl

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
template<class T >
T detail::createSyclObjFromImpl ( decltype(T::impl)  ImplObj)
friend

Member Data Documentation

◆ AdjustedDim

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
constexpr static int sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::AdjustedDim = Dimensions == 0 ? 1 : Dimensions
staticconstexprprotected

Definition at line 2416 of file accessor.hpp.

◆ padding

template<typename DataT , int Dimensions, access::mode AccessMode, access::target AccessTarget, access::placeholder IsPlaceholder, typename PropertyListT >
char sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::padding[sizeof(detail::LocalAccessorBaseDevice< AdjustedDim >)+ sizeof(PtrType) - sizeof(detail::LocalAccessorBaseHost)]
protected

Definition at line 2462 of file accessor.hpp.


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