accessor.h File Reference
This file contains the API for the public facing cl::sycl::accessor class. More...
#include "SYCL/accessor/accessor_base.h"
#include "SYCL/accessor/accessor_ops.h"
#include "SYCL/atomic.h"
#include "SYCL/backend.h"
#include "SYCL/buffer.h"
#include "SYCL/common.h"
#include "SYCL/compat_2020.h"
#include "SYCL/error.h"
#include "SYCL/id.h"
#include "SYCL/predefines.h"
#include "SYCL/type_traits.h"
#include "SYCL/vec_swizzles_impl.h"
#include "computecpp/gsl/gsl"
Go to the source code of this file.
Classes | |
class | cl::sycl::property::no_init_impl |
The no_init property. More... | |
class | cl::sycl::accessor< elemT, kDims, kMode, kTarget, isPlaceholder > |
Public facing interface class for allowing users access to buffer objects, image objects and local memory from within kernel functions and the host. More... | |
struct | std::hash< cl::sycl::accessor< elemT, kDims, kMode, kTarget, isPlaceholder > > |
provides a specialization for std::hash for the buffer class. More... | |
Namespaces | |
cl | |
deduce_type_t takes an arbitrary type and attempts to map it to a cl::sycl::cl_type . | |
cl::sycl | |
cl::sycl::property | |
Macros | |
#define | COMPUTECPP_ACCESSOR_BASE_CLASS(elemT, kDims, kMode, kTarget, isPlaceholder) accessor_base |
Detailed Description
This file contains the API for the public facing cl::sycl::accessor class.
This file contains:
- ACCESSOR_ALIGNMENT
- accessor
The template class accessor is defined entirely in the header file and is defined for both the host side and the device side.
The interface for the accessor class is vastly different depending on the specialization of the template arguments for access mode, access target, dimensions, and element type. This is implemented using enable if to enable only the constructors and operators that are relevant for a particular specialization to be available.
On the host side the accessor class does not contain any fields and inherits its members from its non-templated base class accessor_base. On the device side the accessor class contains a single field, that being the device arguments, which varies depending on the specialization. On the device side it also inherits from the non-template base class accessor_base, however this is in order to make the declaration of the public interface functions available to device compiler when parsing host side only code.
Common macros and structs are defined in accessor_args.h.
The accessor_base class is defined in accessor_base.h.
The subscript_op and sampler_op classes are defined in accessor_ops.h.
Definition in file accessor.h.
Macro Definition Documentation
◆ COMPUTECPP_ACCESSOR_BASE_CLASS
#define COMPUTECPP_ACCESSOR_BASE_CLASS | ( | elemT, | |
kDims, | |||
kMode, | |||
kTarget, | |||
isPlaceholder | |||
) | accessor_base |
Definition at line 348 of file accessor.h.