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

Local accessor. More...

#include <sycl/accessor.hpp>

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

Public Types

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

Public Member Functions

 local_accessor_base ()
 
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 || IsAccessReadOnly)>>
 operator RefType () const
 
template<int Dims = Dimensions, typename = std::enable_if_t<(Dims > 0) && (IsAccessAnyWrite || IsAccessReadOnly)>>
RefType operator[] (id< Dimensions > Index) const
 
template<int Dims = Dimensions, typename = std::enable_if_t<Dims == 1 && (IsAccessAnyWrite || IsAccessReadOnly)>>
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
 
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
 
template<class Obj >
frienddecltype(Obj::impl) const & detail::getSyclObjImpl (const Obj &SyclObject)
 
- Protected Member Functions inherited from sycl::_V1::detail::LocalAccessorBaseHost
 LocalAccessorBaseHost (const LocalAccessorImplPtr &Impl)
 
template<class Obj >
frienddecltype(Obj::impl) const & detail::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 constexpr bool IsAccessAnyWrite = AccessorCommonT::IsAccessAnyWrite
 
static constexpr bool IsAccessReadOnly = AccessorCommonT::IsAccessReadOnly
 
static constexpr bool IsConst = AccessorCommonT::IsConst
 
- Static Protected Attributes inherited from sycl::_V1::detail::accessor_common< DataT, Dimensions, AccessMode, access::target::local, IsPlaceholder >
constexpr static access::address_space AS
 
constexpr static bool IsHostBuf
 
constexpr static bool IsHostTask
 
constexpr static bool IsPlaceH
 
constexpr static bool IsGlobalBuf
 
constexpr static bool IsConstantBuf
 
constexpr static bool IsAccessAnyWrite
 
constexpr static bool IsAccessReadOnly
 
static constexpr bool IsConst
 
constexpr static bool IsAccessReadWrite
 
constexpr static bool IsAccessAtomic
 

Friends

template<typename DataT_ , int Dimensions_>
class local_accessor
 
template<class T >
detail::createSyclObjFromImpl (decltype(T::impl) ImplObj)
 

Detailed Description

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

Local accessor.

Definition at line 2130 of file accessor.hpp.

Member Typedef Documentation

◆ AccessorCommonT

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

Definition at line 2139 of file accessor.hpp.

◆ AccessorSubscript

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

Definition at line 2152 of file accessor.hpp.

◆ ConcreteASPtrType

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

Definition at line 2157 of file accessor.hpp.

◆ const_reference

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

Definition at line 2251 of file accessor.hpp.

◆ PtrType

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

Definition at line 2160 of file accessor.hpp.

◆ reference

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

Definition at line 2250 of file accessor.hpp.

◆ RefType

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

Definition at line 2159 of file accessor.hpp.

◆ value_type

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

Definition at line 2249 of file accessor.hpp.

Constructor & Destructor Documentation

◆ local_accessor_base() [1/6]

template<typename DataT , int Dimensions, access::mode AccessMode, access::placeholder IsPlaceholder>
sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, IsPlaceholder >::local_accessor_base ( )
inline

Definition at line 2195 of file accessor.hpp.

◆ local_accessor_base() [2/6]

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

Definition at line 2200 of file accessor.hpp.

◆ local_accessor_base() [3/6]

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

Definition at line 2254 of file accessor.hpp.

◆ local_accessor_base() [4/6]

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

Definition at line 2269 of file accessor.hpp.

◆ local_accessor_base() [5/6]

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

Definition at line 2287 of file accessor.hpp.

◆ local_accessor_base() [6/6]

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

Definition at line 2305 of file accessor.hpp.

Member Function Documentation

◆ __SYCL2020_DEPRECATED()

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

Definition at line 2325 of file accessor.hpp.

◆ detail::getSyclObjImpl()

template<typename DataT , int Dimensions, access::mode AccessMode, access::placeholder IsPlaceholder>
template<class Obj >
frienddecltype(Obj::impl) const& sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, IsPlaceholder >::detail::getSyclObjImpl ( const Obj &  SyclObject)
protected

◆ GDBMethodsAnchor()

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

Definition at line 2219 of file accessor.hpp.

◆ get_range()

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

Definition at line 2330 of file accessor.hpp.

◆ get_size()

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

Definition at line 2323 of file accessor.hpp.

◆ getLinearIndex()

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

Definition at line 2232 of file accessor.hpp.

◆ getPtr() [1/2]

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

Definition at line 2211 of file accessor.hpp.

References sycl::_V1::detail::LocalAccessorBaseHost::getPtr().

◆ getPtr() [2/2]

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

Definition at line 2212 of file accessor.hpp.

References sycl::_V1::detail::LocalAccessorBaseHost::getPtr().

◆ getQualifiedPtr()

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

Definition at line 2207 of file accessor.hpp.

References sycl::_V1::detail::LocalAccessorBaseHost::getPtr().

◆ getSize() [1/2]

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

◆ getSize() [2/2]

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

◆ operator RefType()

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

Definition at line 2337 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::placeholder IsPlaceholder>
template<int Dims = Dimensions>
sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, IsPlaceholder >::operator typename std::enable_if_t< Dims==0 &&AccessMode==access::mode::atomic, atomic< DataT, AS >> ( ) const
inline

Definition at line 2357 of file accessor.hpp.

◆ operator!=()

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

Definition at line 2392 of file accessor.hpp.

◆ operator==()

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

Definition at line 2389 of file accessor.hpp.

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

◆ operator[]() [1/5]

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

Definition at line 2344 of file accessor.hpp.

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

◆ operator[]() [2/5]

template<typename DataT , int Dimensions, access::mode AccessMode, access::placeholder IsPlaceholder>
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, IsPlaceholder >::operator[] ( id< Dimensions Index) const
inline

Definition at line 2367 of file accessor.hpp.

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

◆ operator[]() [3/5]

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

Definition at line 2352 of file accessor.hpp.

◆ operator[]() [4/5]

template<typename DataT , int Dimensions, access::mode AccessMode, access::placeholder IsPlaceholder>
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, IsPlaceholder >::operator[] ( size_t  Index) const
inline

Definition at line 2376 of file accessor.hpp.

◆ operator[]() [5/5]

template<typename DataT , int Dimensions, access::mode AccessMode, access::placeholder IsPlaceholder>
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, IsPlaceholder >::operator[] ( size_t  Index) const
inline

Definition at line 2385 of file accessor.hpp.

◆ size()

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

Definition at line 2327 of file accessor.hpp.

Friends And Related Function Documentation

◆ detail::createSyclObjFromImpl

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

◆ local_accessor

template<typename DataT , int Dimensions, access::mode AccessMode, access::placeholder IsPlaceholder>
template<typename DataT_ , int Dimensions_>
friend class local_accessor
friend

Definition at line 2246 of file accessor.hpp.

Member Data Documentation

◆ AdjustedDim

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

Definition at line 2137 of file accessor.hpp.

◆ IsAccessAnyWrite

template<typename DataT , int Dimensions, access::mode AccessMode, access::placeholder IsPlaceholder>
constexpr bool sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, IsPlaceholder >::IsAccessAnyWrite = AccessorCommonT::IsAccessAnyWrite
staticconstexprprotected

Definition at line 2147 of file accessor.hpp.

◆ IsAccessReadOnly

template<typename DataT , int Dimensions, access::mode AccessMode, access::placeholder IsPlaceholder>
constexpr bool sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, IsPlaceholder >::IsAccessReadOnly = AccessorCommonT::IsAccessReadOnly
staticconstexprprotected

Definition at line 2148 of file accessor.hpp.

◆ IsConst

template<typename DataT , int Dimensions, access::mode AccessMode, access::placeholder IsPlaceholder>
constexpr bool sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, IsPlaceholder >::IsConst = AccessorCommonT::IsConst
staticconstexprprotected

Definition at line 2149 of file accessor.hpp.

◆ padding

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

Definition at line 2203 of file accessor.hpp.


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