DPC++ Runtime
Runtime libraries for oneAPI DPC++
accessor.hpp File Reference
Include dependency graph for accessor.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  sycl::_V1::accessor< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >
 
struct  sycl::_V1::detail::AccHostDataT
 
struct  sycl::_V1::detail::IsCxPropertyList< T >
 
struct  sycl::_V1::detail::IsCxPropertyList< ext::oneapi::accessor_property_list< Props... > >
 
struct  sycl::_V1::detail::IsCxPropertyList< ext::oneapi::accessor_property_list<> >
 
class  sycl::_V1::detail::accessor_common< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >
 
class  sycl::_V1::detail::accessor_common< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >::AccessorSubscript< SubDims, AccType >
 
class  sycl::_V1::detail::LocalAccessorBaseDevice< Dims >
 
class  sycl::_V1::detail::AccessorImplDevice< Dims >
 
class  sycl::_V1::detail::AccessorBaseHost
 
class  sycl::_V1::detail::LocalAccessorBaseHost
 
struct  sycl::_V1::detail::IsValidCoordDataT< Dim, T >
 
struct  sycl::_V1::detail::IsValidCoordDataT< 1, T >
 
struct  sycl::_V1::detail::IsValidCoordDataT< 2, T >
 
struct  sycl::_V1::detail::IsValidCoordDataT< 3, T >
 
class  sycl::_V1::detail::__image_array_slice__< DataT, Dimensions, AccessMode, IsPlaceholder >
 
class  sycl::_V1::detail::image_accessor< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder >
 
class  sycl::_V1::detail::__image_array_slice__< DataT, Dimensions, AccessMode, IsPlaceholder >
 
class  sycl::_V1::local_accessor_base< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder, PropertyListT >
 Buffer accessor. More...
 
class  sycl::_V1::accessor< DataT, Dimensions, AccessMode, access::target::local, IsPlaceholder >
 
class  sycl::_V1::accessor< DataT, Dimensions, AccessMode, access::target::host_image, IsPlaceholder >
 Host image accessor. More...
 
class  sycl::_V1::host_accessor< DataT, Dimensions, AccessMode >
 
struct  std::hash< sycl::accessor< DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder > >
 

Namespaces

 sycl
 ---— Error handling, matching OpenCL plugin semantics.
 
 sycl::_V1
 
 sycl::_V1::ext
 
 sycl::_V1::ext::intel
 
 sycl::_V1::ext::intel::esimd
 
 sycl::_V1::ext::intel::esimd::detail
 
 sycl::_V1::detail
 
 std
 

Typedefs

template<typename T >
using sycl::_V1::detail::IsPropertyListT = typename std::is_base_of< PropertyListBase, T >
 
template<typename T >
using sycl::_V1::detail::IsRunTimePropertyListT = typename std::is_same< ext::oneapi::accessor_property_list<>, T >
 
using sycl::_V1::detail::AccessorImplPtr = std::shared_ptr< AccessorImplHost >
 
using sycl::_V1::detail::LocalAccessorImplPtr = std::shared_ptr< LocalAccessorImplHost >
 

Functions

template<size_t... Inds, class F >
void sycl::_V1::detail::dim_loop_impl (std::integer_sequence< size_t, Inds... >, F &&f)
 
template<size_t count, class F >
void sycl::_V1::detail::dim_loop (F &&f)
 
void sycl::_V1::detail::constructorNotification (void *BufferObj, void *AccessorObj, access::target Target, access::mode Mode, const code_location &CodeLoc)
 
device sycl::_V1::detail::getDeviceFromHandler (handler &CommandGroupHandlerRef)
 
void sycl::_V1::detail::addHostAccessorAndWait (AccessorImplHost *Req)
 
template<typename DataT , int Dimensions, access::mode AccessMode, access::placeholder IsPlaceholder>
class __SYCL_SPECIAL_CLASS __SYCL_TYPE(local_accessor) local_accessor class __SYCL_SPECIAL_CLASS sycl::_V1::__SYCL_TYPE (accessor) accessor< DataT
 Image accessors. More...
 
template<typename DataT , int Dimensions, access::mode AccessMode, access::placeholder IsPlaceholder>
class __SYCL_SPECIAL_CLASS sycl::_V1::__SYCL_TYPE (accessor) accessor< DataT
 Image array accessor. More...
 

Variables

class __SYCL_SPECIAL_CLASS __SYCL_TYPE(local_accessor) local_accessor class __SYCL_SPECIAL_CLASS sycl::_V1::Dimensions
 
class __SYCL_SPECIAL_CLASS __SYCL_TYPE(local_accessor) local_accessor class __SYCL_SPECIAL_CLASS sycl::_V1::AccessMode
 
class __SYCL_SPECIAL_CLASS __SYCL_TYPE(local_accessor) local_accessor class __SYCL_SPECIAL_CLASS sycl::_V1::IsPlaceholder
 

Detailed Description

The file contains implementations of accessor class.

Objects of accessor class define a requirement to access some SYCL memory object or local memory of the device.

Basically there are 3 distinct types of accessors.

One of them is an accessor to a SYCL buffer object(Buffer accessor) which has the richest interface. It supports things like accessing only a part of buffer, multidimensional access using sycl::id, conversions to various multi_ptr and atomic classes.

Second type is an accessor to a SYCL image object(Image accessor) which has "image" specific methods for reading and writing.

Finally, accessor to local memory(Local accessor) doesn't require access to any SYCL memory object, but asks for some local memory on device to be available. Some methods overlap with ones that "Buffer accessor" provides.

Buffer and Image accessors create the requirement to access some SYCL memory object(or part of it). SYCL RT must detect when two kernels want to access the same memory objects and make sure they are executed in correct order.

"accessor_common" class that contains several common methods between Buffer and Local accessors.

Accessors have different representation on host and on device. On host they have non-templated base class, that is needed to safely work with any accessor type. Furhermore on host we need some additional fields in order to implement functionality required by Specification, for example during lifetime of a host accessor other operations with memory object the accessor refers to should be blocked and when all references to the host accessor are desctructed, the memory this host accessor refers to should be "written back".

The scheme of inheritance for host side:

dot_inline_dotgraph_1.png

For host side AccessorBaseHost/LocalAccessorBaseHost contains shared_ptr which points to AccessorImplHost/LocalAccessorImplHost object.

The scheme of inheritance for device side:

dot_inline_dotgraph_2.png

For device side AccessorImplHost/LocalAccessorImplHost are fileds of accessor(1) and accessor(3).

accessor(1) declares accessor as a template class and implements accessor class for access targets: host_buffer, global_buffer and constant_buffer.

accessor(3) specializes accessor(1) for the local access target.

image_accessor contains implements interfaces for access targets: host_image, image and image_array. But there are three distinct specializations of the accessor(1) (accessor(2), accessor(4), accessor(5)) that are just inherited from image_accessor.

accessor_common contains several helpers common for both accessor(1) and accessor(3)

Definition in file accessor.hpp.