DPC++ Runtime
Runtime libraries for oneAPI DPC++
cl::sycl::host_accessor< DataT, Dimensions, AccessMode > Class Template Reference

#include <CL/sycl/accessor.hpp>

Inheritance diagram for cl::sycl::host_accessor< DataT, Dimensions, AccessMode >:
Collaboration diagram for cl::sycl::host_accessor< DataT, Dimensions, AccessMode >:

Public Member Functions

 host_accessor ()
 
template<typename T = DataT, int Dims = Dimensions, typename AllocatorT , typename = typename detail::enable_if_t< std::is_same<T, DataT>::value && Dims == 0>>
 host_accessor (buffer< T, 1, AllocatorT > &BufferRef, const property_list &PropertyList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
template<typename T = DataT, int Dims = Dimensions, typename AllocatorT , typename = detail::enable_if_t<IsSameAsBuffer<T, Dims>()>>
 host_accessor (buffer< T, Dims, AllocatorT > &BufferRef, const property_list &PropertyList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
template<typename T = DataT, int Dims = Dimensions, typename AllocatorT , typename = detail::enable_if_t<IsSameAsBuffer<T, Dims>()>>
 host_accessor (buffer< T, Dims, AllocatorT > &BufferRef, handler &CommandGroupHandler, const property_list &PropertyList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
template<typename T = DataT, int Dims = Dimensions, typename AllocatorT , typename = detail::enable_if_t<IsSameAsBuffer<T, Dims>()>>
 host_accessor (buffer< DataT, Dimensions, AllocatorT > &BufferRef, range< Dimensions > AccessRange, const property_list &PropertyList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
template<typename T = DataT, int Dims = Dimensions, typename AllocatorT , typename = detail::enable_if_t<IsSameAsBuffer<T, Dims>()>>
 host_accessor (buffer< DataT, Dimensions, AllocatorT > &BufferRef, handler &CommandGroupHandler, range< Dimensions > AccessRange, const property_list &PropertyList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
template<typename T = DataT, int Dims = Dimensions, typename AllocatorT , typename = detail::enable_if_t<IsSameAsBuffer<T, Dims>()>>
 host_accessor (buffer< DataT, Dimensions, AllocatorT > &BufferRef, range< Dimensions > AccessRange, id< Dimensions > AccessOffset, const property_list &PropertyList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
template<typename T = DataT, int Dims = Dimensions, typename AllocatorT , typename = detail::enable_if_t<IsSameAsBuffer<T, Dims>()>>
 host_accessor (buffer< DataT, Dimensions, AllocatorT > &BufferRef, handler &CommandGroupHandler, range< Dimensions > AccessRange, id< Dimensions > AccessOffset, const property_list &PropertyList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
- Public Member Functions inherited from cl::sycl::accessor< DataT, 1, access_mode::read_write, target::host_buffer, access::placeholder::false_t >
 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
 

Protected Types

using AccessorT = accessor< DataT, Dimensions, AccessMode, target::host_buffer, access::placeholder::false_t >
 
- Protected Types inherited from cl::sycl::accessor< DataT, 1, access_mode::read_write, target::host_buffer, access::placeholder::false_t >
using AccessorCommonT = detail::accessor_common< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >
 
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

void __init (typename accessor< DataT, Dimensions, AccessMode, target::host_buffer, access::placeholder::false_t >::ConcreteASPtrType Ptr, range< AdjustedDim > AccessRange, range< AdjustedDim > MemRange, id< AdjustedDim > Offset)
 
- Protected Member Functions inherited from cl::sycl::accessor< DataT, 1, access_mode::read_write, target::host_buffer, access::placeholder::false_t >
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

template<typename T , int Dims>
static constexpr bool IsSameAsBuffer ()
 
- Static Protected Member Functions inherited from cl::sycl::accessor< DataT, 1, access_mode::read_write, target::host_buffer, access::placeholder::false_t >
static constexpr bool IsSameAsBuffer ()
 
static access::mode getAdjustedMode (const PropertyListT &PropertyList)
 

Static Protected Attributes

constexpr static int AdjustedDim = Dimensions == 0 ? 1 : Dimensions
 
- Static Protected Attributes inherited from cl::sycl::accessor< DataT, 1, access_mode::read_write, target::host_buffer, access::placeholder::false_t >
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

- Public Types inherited from cl::sycl::accessor< DataT, 1, access_mode::read_write, target::host_buffer, access::placeholder::false_t >
using value_type = DataT
 
using reference = DataT &
 
using const_reference = const DataT &
 
- Protected Attributes inherited from cl::sycl::accessor< DataT, 1, access_mode::read_write, target::host_buffer, access::placeholder::false_t >
char padding [sizeof(detail::AccessorImplDevice< AdjustedDim >)+sizeof(PtrType) - sizeof(detail::AccessorBaseHost)]
 

Detailed Description

template<typename DataT, int Dimensions = 1, access_mode AccessMode = access_mode::read_write>
class cl::sycl::host_accessor< DataT, Dimensions, AccessMode >

Definition at line 2376 of file accessor.hpp.

Member Typedef Documentation

◆ AccessorT

template<typename DataT , int Dimensions = 1, access_mode AccessMode = access_mode::read_write>
using cl::sycl::host_accessor< DataT, Dimensions, AccessMode >::AccessorT = accessor<DataT, Dimensions, AccessMode, target::host_buffer, access::placeholder::false_t>
protected

Definition at line 2381 of file accessor.hpp.

Constructor & Destructor Documentation

◆ host_accessor() [1/8]

template<typename DataT , int Dimensions = 1, access_mode AccessMode = access_mode::read_write>
cl::sycl::host_accessor< DataT, Dimensions, AccessMode >::host_accessor ( )
inline

Definition at line 2406 of file accessor.hpp.

◆ host_accessor() [2/8]

template<typename DataT , int Dimensions = 1, access_mode AccessMode = access_mode::read_write>
template<typename T = DataT, int Dims = Dimensions, typename AllocatorT , typename = typename detail::enable_if_t< std::is_same<T, DataT>::value && Dims == 0>>
cl::sycl::host_accessor< DataT, Dimensions, AccessMode >::host_accessor ( buffer< T, 1, AllocatorT > &  BufferRef,
const property_list PropertyList = {},
const detail::code_location  CodeLoc = detail::code_location::current() 
)
inline

Definition at line 2434 of file accessor.hpp.

◆ host_accessor() [3/8]

template<typename DataT , int Dimensions = 1, access_mode AccessMode = access_mode::read_write>
template<typename T = DataT, int Dims = Dimensions, typename AllocatorT , typename = detail::enable_if_t<IsSameAsBuffer<T, Dims>()>>
cl::sycl::host_accessor< DataT, Dimensions, AccessMode >::host_accessor ( buffer< T, Dims, AllocatorT > &  BufferRef,
const property_list PropertyList = {},
const detail::code_location  CodeLoc = detail::code_location::current() 
)
inline

Definition at line 2442 of file accessor.hpp.

◆ host_accessor() [4/8]

template<typename DataT , int Dimensions = 1, access_mode AccessMode = access_mode::read_write>
template<typename T = DataT, int Dims = Dimensions, typename AllocatorT , typename = detail::enable_if_t<IsSameAsBuffer<T, Dims>()>>
cl::sycl::host_accessor< DataT, Dimensions, AccessMode >::host_accessor ( buffer< T, Dims, AllocatorT > &  BufferRef,
handler CommandGroupHandler,
const property_list PropertyList = {},
const detail::code_location  CodeLoc = detail::code_location::current() 
)
inline

Definition at line 2462 of file accessor.hpp.

◆ host_accessor() [5/8]

template<typename DataT , int Dimensions = 1, access_mode AccessMode = access_mode::read_write>
template<typename T = DataT, int Dims = Dimensions, typename AllocatorT , typename = detail::enable_if_t<IsSameAsBuffer<T, Dims>()>>
cl::sycl::host_accessor< DataT, Dimensions, AccessMode >::host_accessor ( buffer< DataT, Dimensions, AllocatorT > &  BufferRef,
range< Dimensions AccessRange,
const property_list PropertyList = {},
const detail::code_location  CodeLoc = detail::code_location::current() 
)
inline

Definition at line 2483 of file accessor.hpp.

◆ host_accessor() [6/8]

template<typename DataT , int Dimensions = 1, access_mode AccessMode = access_mode::read_write>
template<typename T = DataT, int Dims = Dimensions, typename AllocatorT , typename = detail::enable_if_t<IsSameAsBuffer<T, Dims>()>>
cl::sycl::host_accessor< DataT, Dimensions, AccessMode >::host_accessor ( buffer< DataT, Dimensions, AllocatorT > &  BufferRef,
handler CommandGroupHandler,
range< Dimensions AccessRange,
const property_list PropertyList = {},
const detail::code_location  CodeLoc = detail::code_location::current() 
)
inline

Definition at line 2504 of file accessor.hpp.

◆ host_accessor() [7/8]

template<typename DataT , int Dimensions = 1, access_mode AccessMode = access_mode::read_write>
template<typename T = DataT, int Dims = Dimensions, typename AllocatorT , typename = detail::enable_if_t<IsSameAsBuffer<T, Dims>()>>
cl::sycl::host_accessor< DataT, Dimensions, AccessMode >::host_accessor ( buffer< DataT, Dimensions, AllocatorT > &  BufferRef,
range< Dimensions AccessRange,
id< Dimensions AccessOffset,
const property_list PropertyList = {},
const detail::code_location  CodeLoc = detail::code_location::current() 
)
inline

Definition at line 2528 of file accessor.hpp.

◆ host_accessor() [8/8]

template<typename DataT , int Dimensions = 1, access_mode AccessMode = access_mode::read_write>
template<typename T = DataT, int Dims = Dimensions, typename AllocatorT , typename = detail::enable_if_t<IsSameAsBuffer<T, Dims>()>>
cl::sycl::host_accessor< DataT, Dimensions, AccessMode >::host_accessor ( buffer< DataT, Dimensions, AllocatorT > &  BufferRef,
handler CommandGroupHandler,
range< Dimensions AccessRange,
id< Dimensions AccessOffset,
const property_list PropertyList = {},
const detail::code_location  CodeLoc = detail::code_location::current() 
)
inline

Definition at line 2552 of file accessor.hpp.

Member Function Documentation

◆ __init()

template<typename DataT , int Dimensions = 1, access_mode AccessMode = access_mode::read_write>
void cl::sycl::host_accessor< DataT, Dimensions, AccessMode >::__init ( typename accessor< DataT, Dimensions, AccessMode, target::host_buffer, access::placeholder::false_t >::ConcreteASPtrType  Ptr,
range< AdjustedDim AccessRange,
range< AdjustedDim MemRange,
id< AdjustedDim Offset 
)
inlineprotected

Definition at line 2398 of file accessor.hpp.

◆ IsSameAsBuffer()

template<typename DataT , int Dimensions = 1, access_mode AccessMode = access_mode::read_write>
template<typename T , int Dims>
static constexpr bool cl::sycl::host_accessor< DataT, Dimensions, AccessMode >::IsSameAsBuffer ( )
inlinestaticconstexprprotected

Definition at line 2385 of file accessor.hpp.

References cl::sycl::Dimensions.

Member Data Documentation

◆ AdjustedDim

template<typename DataT , int Dimensions = 1, access_mode AccessMode = access_mode::read_write>
constexpr static int cl::sycl::host_accessor< DataT, Dimensions, AccessMode >::AdjustedDim = Dimensions == 0 ? 1 : Dimensions
staticconstexprprotected

Definition at line 2383 of file accessor.hpp.


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