8 #ifdef __SYCL_DEVICE_ONLY__
13 inline namespace _V1 {
33 constexpr
static bool value = std::is_same_v<T, int>;
36 constexpr
static bool value = std::is_same_v<T, int2>;
39 constexpr
static bool value = std::is_same_v<T, int4>;
44 constexpr
static bool value = std::is_same_v<T, float>;
47 constexpr
static bool value = std::is_same_v<T, float2>;
50 constexpr
static bool value = std::is_same_v<T, float4>;
54 void *ImageObj,
void *AccessorObj,
56 const void *Type, uint32_t ElemSize,
const code_location &CodeLoc);
59 void *ImageObj,
void *AccessorObj,
60 const std::optional<image_target> &Target,
const void *Type,
66 std::shared_ptr<UnsampledImageAccessorImplHost>;
68 std::shared_ptr<SampledImageAccessorImplHost>;
82 void *SYCLMemObject,
int Dims,
int ElemSize,
87 void *getMemoryObject()
const;
91 int getNumOfDims()
const;
92 int getElementSize()
const;
93 id<3> getPitch()
const;
100 friend const decltype(Obj::impl) &
111 const auto *this_const =
this;
113 (void)this_const->getSize();
115 (void)this_const->getPtr();
119 #ifndef __SYCL_DEVICE_ONLY__
123 template <
typename DataT,
typename CoordT>
128 return imageReadSamplerHostImpl<CoordT, DataT>(
129 Coords, Smpl, getSize(), getPitch(), getChannelType(),
130 getChannelOrder(), getPtr(), getElementSize());
136 template <
typename DataT,
typename CoordT>
137 void write(
const CoordT &Coords,
const DataT &Color)
const {
139 getChannelType(), getChannelOrder(), getPtr());
151 int Dims,
int ElemSize,
id<3> Pitch,
157 void *getMemoryObject()
const;
160 void *getPtr()
const;
161 int getNumOfDims()
const;
162 int getElementSize()
const;
163 id<3> getPitch()
const;
171 friend const decltype(Obj::impl) &
182 const auto *this_const =
this;
184 (void)this_const->getSize();
186 (void)this_const->getPtr();
190 #ifndef __SYCL_DEVICE_ONLY__
194 template <
typename DataT,
typename CoordT>
195 DataT
read(
const CoordT &Coords)
const {
196 return imageReadSamplerHostImpl<CoordT, DataT>(
197 Coords, getSampler(), getSize(), getPitch(), getChannelType(),
198 getChannelOrder(), getPtr(), getElementSize());
205 class __image_array_slice__;
211 #ifndef __SYCL_DEVICE_ONLY__
221 OCLImageTy MImageObj;
227 void imageAccessorInit(OCLImageTy Image) { MImageObj = Image; }
231 template <
typename T1,
int T2, access::mode T3, access::placeholder T4>
234 constexpr
static bool IsHostImageAcc =
239 constexpr
static bool IsImageArrayAcc =
242 constexpr
static bool IsImageAccessWriteOnly =
246 constexpr
static bool IsImageAccessAnyWrite =
249 constexpr
static bool IsImageAccessReadOnly =
252 constexpr
static bool IsImageAccessAnyRead =
259 "The data type of an image accessor must be only cl_int4, "
260 "cl_uint4, cl_float4 or cl_half4 from SYCL namespace");
262 static_assert(IsImageAcc || IsHostImageAcc || IsImageArrayAcc,
263 "Expected image type");
266 "Expected false as Placeholder value for image accessor.");
269 ((IsImageAcc || IsImageArrayAcc) &&
270 (IsImageAccessWriteOnly || IsImageAccessReadOnly)) ||
271 (IsHostImageAcc && (IsImageAccessAnyWrite || IsImageAccessAnyRead)),
272 "Access modes can be only read/write/discard_write for image/image_array "
273 "target accessor, or they can be only "
274 "read/write/discard_write/read_write for host_image target accessor.");
277 "Dimensions can be 1/2/3 for image accessor.");
279 #ifdef __SYCL_DEVICE_ONLY__
282 return __invoke_ImageQuerySize<sycl::vec<int, Dimensions>, OCLImageTy>(
286 size_t getElementSize()
const {
287 int ChannelType = __invoke_ImageQueryFormat<int, OCLImageTy>(MImageObj);
288 int ChannelOrder = __invoke_ImageQueryOrder<int, OCLImageTy>(MImageObj);
289 int ElementSize = getSPIRVElementSize(ChannelType, ChannelOrder);
299 "image::getRangeInternal() is not implemented for host");
305 #ifndef __SYCL_DEVICE_ONLY__
313 #ifdef __SYCL_DEVICE_ONLY__
314 const OCLImageTy getNativeImageObj()
const {
return MImageObj; }
324 #ifdef __SYCL_DEVICE_ONLY__
334 typename = std::enable_if_t<(Dims > 0 && Dims <= 3) && IsHostImageAcc>>
336 #ifdef __SYCL_DEVICE_ONLY__
339 (void)ImageElementSize;
345 detail::convertToArrayOfN<3, 1>(ImageRef.
get_range()),
346 detail::convertToArrayOfN<3, 1>(ImageRef.
get_range()),
349 MImageCount(ImageRef.
size()),
350 MImgChannelOrder(ImageRef.getChannelOrder()),
351 MImgChannelType(ImageRef.getChannelType()) {
360 template <
typename AllocatorT,
int Dims =
Dimensions,
361 typename = std::enable_if_t<(Dims > 0 && Dims <= 3) && IsImageAcc>>
363 handler &CommandGroupHandlerRef,
int ImageElementSize)
364 #ifdef __SYCL_DEVICE_ONLY__
367 (void)CommandGroupHandlerRef;
368 (void)ImageElementSize;
374 detail::convertToArrayOfN<3, 1>(ImageRef.
get_range()),
375 detail::convertToArrayOfN<3, 1>(ImageRef.
get_range()),
378 MImageCount(ImageRef.
size()),
379 MImgChannelOrder(ImageRef.getChannelOrder()),
380 MImgChannelType(ImageRef.getChannelType()) {
383 if (!Device.
has(aspect::ext_intel_legacy_image))
385 sycl::errc::feature_not_supported,
386 "SYCL 1.2.1 images are not supported by this device.");
394 #ifndef __SYCL_DEVICE_ONLY__
413 #ifdef __SYCL_DEVICE_ONLY__
416 size_t get_count()
const {
return size(); }
417 size_t size() const
noexcept {
return get_range<Dimensions>().size(); }
419 template <
int Dims = Dimensions,
typename = std::enable_if_t<Dims == 1>>
421 int Range = getRangeInternal();
424 template <
int Dims = Dimensions,
typename = std::enable_if_t<Dims == 2>>
426 int2 Range = getRangeInternal();
427 return range<2>(Range[0], Range[1]);
429 template <
int Dims = Dimensions,
typename = std::enable_if_t<Dims == 3>>
431 int3 Range = getRangeInternal();
432 return range<3>(Range[0], Range[1], Range[2]);
437 size_t get_count()
const {
return size(); };
440 template <
int Dims = Dimensions,
typename = std::enable_if_t<(Dims > 0)>>
451 template <
typename CoordT,
int Dims =
Dimensions,
452 typename = std::enable_if_t<
454 (detail::is_genint_v<CoordT>) &&
455 ((IsImageAcc && IsImageAccessReadOnly) ||
456 (IsHostImageAcc && IsImageAccessAnyRead))>>
457 DataT
read(
const CoordT &Coords)
const {
458 #ifdef __SYCL_DEVICE_ONLY__
459 return __invoke__ImageRead<DataT, OCLImageTy, CoordT>(MImageObj, Coords);
463 return read<CoordT, Dims>(Coords, Smpl);
471 template <
typename CoordT,
int Dims =
Dimensions,
472 typename = std::enable_if_t<
474 ((IsImageAcc && IsImageAccessReadOnly) ||
475 (IsHostImageAcc && IsImageAccessAnyRead))>>
476 DataT
read(
const CoordT &Coords,
const sampler &Smpl)
const {
477 #ifdef __SYCL_DEVICE_ONLY__
478 return __invoke__ImageReadSampler<DataT, OCLImageTy, CoordT>(
479 MImageObj, Coords, Smpl.impl.m_Sampler);
481 return imageReadSamplerHostImpl<CoordT, DataT>(
483 getOffset() , MImgChannelType, MImgChannelOrder,
497 typename = std::enable_if_t<(Dims > 0) && (detail::is_genint_v<CoordT>) &&
499 ((IsImageAcc && IsImageAccessWriteOnly) ||
500 (IsHostImageAcc && IsImageAccessAnyWrite))>>
501 void write(
const CoordT &Coords,
const DataT &Color)
const {
502 #ifdef __SYCL_DEVICE_ONLY__
503 __invoke__ImageWrite<OCLImageTy, CoordT, DataT>(MImageObj, Coords, Color);
518 "Image slice cannot have more then 2 dimensions");
522 template <
typename CoordT,
typename CoordElemType = get_elem_type_t<CoordT>>
524 getAdjustedCoords(
const CoordT &Coords)
const {
525 CoordElemType LastCoord = 0;
527 if (std::is_same<float, CoordElemType>::value) {
530 MIdx /
static_cast<float>(Size.template swizzle<Dimensions>());
538 return AdjustedCoords;
547 : MBaseAcc(BaseAcc), MIdx(Idx) {}
549 template <
typename CoordT,
int Dims =
Dimensions,
550 typename = std::enable_if_t<
552 DataT
read(
const CoordT &Coords)
const {
553 return MBaseAcc.read(getAdjustedCoords(Coords));
556 template <
typename CoordT,
int Dims =
Dimensions,
557 typename = std::enable_if_t<(Dims > 0) &&
559 DataT
read(
const CoordT &Coords,
const sampler &Smpl)
const {
560 return MBaseAcc.read(getAdjustedCoords(Coords), Smpl);
563 template <
typename CoordT,
int Dims =
Dimensions,
564 typename = std::enable_if_t<(Dims > 0) &&
566 void write(
const CoordT &Coords,
const DataT &Color)
const {
567 return MBaseAcc.write(getAdjustedCoords(Coords), Color);
570 #ifdef __SYCL_DEVICE_ONLY__
572 size_t get_count()
const {
return size(); }
573 size_t size() const
noexcept {
return get_range<Dimensions>().size(); }
575 template <
int Dims = Dimensions,
typename = std::enable_if_t<Dims == 1>>
577 int2 Count = MBaseAcc.getRangeInternal();
580 template <
int Dims = Dimensions,
typename = std::enable_if_t<Dims == 2>>
582 int3 Count = MBaseAcc.getRangeInternal();
583 return range<2>(Count.x(), Count.y());
589 size_t get_count()
const {
return size(); }
591 return MBaseAcc.MImageCount / MBaseAcc.getAccessRange()[
Dimensions];
595 typename = std::enable_if_t<(Dims == 1 || Dims == 2)>>
597 return detail::convertToArrayOfN<Dims, 1>(MBaseAcc.getAccessRange());
619 :
public detail::image_accessor<DataT, Dimensions, AccessMode,
620 access::target::image, IsPlaceholder>,
621 public detail::OwnerLessBase<
622 accessor<DataT, Dimensions, AccessMode, access::target::image,
630 template <
typename AllocatorT>
635 Image, CommandGroupHandler, Image.getElementSize()) {
636 #ifndef __SYCL_DEVICE_ONLY__
642 template <
typename AllocatorT>
647 Image, CommandGroupHandler, Image.getElementSize()) {
649 #ifndef __SYCL_DEVICE_ONLY__
654 #ifdef __SYCL_DEVICE_ONLY__
662 void __init(OCLImageTy Image) { this->imageAccessorInit(Image); }
665 void __init_esimd(OCLImageTy Image) { this->imageAccessorInit(Image); }
685 access::target::host_image, IsPlaceholder>,
687 accessor<DataT, Dimensions, AccessMode, access::target::host_image,
690 template <
typename AllocatorT>
694 Image, Image.getElementSize()) {}
696 template <
typename AllocatorT>
701 Image, Image.getElementSize()) {
718 :
public detail::image_accessor<DataT, Dimensions + 1, AccessMode,
719 access::target::image, IsPlaceholder>,
720 public detail::OwnerLessBase<
721 accessor<DataT, Dimensions, AccessMode, access::target::image_array,
723 #ifdef __SYCL_DEVICE_ONLY__
731 void __init(OCLImageTy Image) { this->imageAccessorInit(Image); }
734 void __init_esimd(OCLImageTy Image) { this->imageAccessorInit(Image); }
741 template <
typename AllocatorT>
743 handler &CommandGroupHandler)
746 Image, CommandGroupHandler, Image.getElementSize()) {
747 #ifndef __SYCL_DEVICE_ONLY__
753 template <
typename AllocatorT>
755 handler &CommandGroupHandler,
const property_list &propList)
758 Image, CommandGroupHandler, Image.getElementSize()) {
760 #ifndef __SYCL_DEVICE_ONLY__
766 detail::__image_array_slice__<DataT, Dimensions, AccessMode, IsPlaceholder>
778 #ifndef __SYCL_DEVICE_ONLY__
782 unsampled_image_accessor<DataT, Dimensions, AccessMode, AccessTarget>> {
783 static_assert(std::is_same_v<DataT, int4> || std::is_same_v<DataT, uint4> ||
784 std::is_same_v<DataT, float4> ||
785 std::is_same_v<DataT, half4>,
786 "The data type of an image accessor must be only int4, "
787 "uint4, float4 or half4 from SYCL namespace");
790 "Access mode must be either read or write.");
792 #ifdef __SYCL_DEVICE_ONLY__
800 const DataT, DataT>::type;
804 template <
typename AllocatorT>
809 #ifdef __SYCL_DEVICE_ONLY__
812 (void)CommandGroupHandlerRef;
817 : host_base_class(detail::convertToArrayOfN<3, 1>(ImageRef.
get_range()),
820 {ImageRef.getRowPitch(), ImageRef.getSlicePitch(), 0},
825 aspect ImageAspect = aspect::image;
829 "Device associated with command group handler does not have "
834 AccessMode, (
const void *)
typeid(DataT).name(),
sizeof(DataT), CodeLoc);
853 #ifdef __SYCL_DEVICE_ONLY__
857 return Rhs.impl == impl;
862 return !(Rhs == *
this);
867 #ifndef __SYCL_DEVICE_ONLY__
868 return getPropList().template has_property<Property>();
874 #ifndef __SYCL_DEVICE_ONLY__
875 return getPropList().template get_property<Property>();
882 #ifdef __SYCL_DEVICE_ONLY__
886 return host_base_class::getSize().size();
894 template <
typename CoordT,
899 #ifdef __SYCL_DEVICE_ONLY__
901 std::ignore = Coords;
904 return host_base_class::read<DataT>(Coords);
912 template <
typename CoordT,
916 void write(
const CoordT &Coords,
const DataT &Color)
const {
917 #ifdef __SYCL_DEVICE_ONLY__
919 std::ignore = Coords;
922 host_base_class::write<DataT>(Coords, Color);
928 #ifndef __SYCL_DEVICE_ONLY__
929 : host_base_class{Impl}
936 friend const decltype(Obj::impl) &
951 static_assert(std::is_same_v<DataT, int4> || std::is_same_v<DataT, uint4> ||
952 std::is_same_v<DataT, float4> ||
953 std::is_same_v<DataT, half4>,
954 "The data type of an image accessor must be only int4, "
955 "uint4, float4 or half4 from SYCL namespace");
961 const DataT, DataT>::type;
965 template <
typename AllocatorT>
970 : base_class(detail::convertToArrayOfN<3, 1>(ImageRef.
get_range()),
980 AccessMode, (
const void *)
typeid(DataT).name(),
sizeof(DataT), CodeLoc);
999 return Rhs.impl == impl;
1002 return !(Rhs == *
this);
1007 #ifndef __SYCL_DEVICE_ONLY__
1008 return getPropList().template has_property<Property>();
1014 #ifndef __SYCL_DEVICE_ONLY__
1015 return getPropList().template get_property<Property>();
1030 typename = std::enable_if_t<
1035 #ifdef __SYCL_DEVICE_ONLY__
1041 return base_class::read<DataT>(Coords);
1052 typename = std::enable_if_t<
1056 void write(
const CoordT &Coords,
const DataT &Color)
const
1057 #ifdef __SYCL_DEVICE_ONLY__
1063 base_class::write<DataT>(Coords, Color);
1070 : base_class{Impl} {}
1072 template <
class Obj>
1073 friend const decltype(Obj::impl) &
1083 #ifndef __SYCL_DEVICE_ONLY__
1087 sampled_image_accessor<DataT, Dimensions, AccessTarget>> {
1088 static_assert(std::is_same_v<DataT, int4> || std::is_same_v<DataT, uint4> ||
1089 std::is_same_v<DataT, float4> ||
1090 std::is_same_v<DataT, half4>,
1091 "The data type of an image accessor must be only int4, "
1092 "uint4, float4 or half4 from SYCL namespace");
1094 #ifdef __SYCL_DEVICE_ONLY__
1105 template <
typename AllocatorT>
1110 #ifdef __SYCL_DEVICE_ONLY__
1113 (void)CommandGroupHandlerRef;
1118 : host_base_class(detail::convertToArrayOfN<3, 1>(ImageRef.
get_range()),
1121 {ImageRef.getRowPitch(), ImageRef.getSlicePitch(), 0},
1126 aspect ImageAspect = aspect::image;
1130 "Device associated with command group handler does not have "
1135 (
const void *)
typeid(DataT).name(),
sizeof(DataT), CodeLoc);
1154 #ifdef __SYCL_DEVICE_ONLY__
1158 return Rhs.impl == impl;
1163 return !(Rhs == *
this);
1168 #ifndef __SYCL_DEVICE_ONLY__
1169 return getPropList().template has_property<Property>();
1175 #ifndef __SYCL_DEVICE_ONLY__
1176 return getPropList().template get_property<Property>();
1183 #ifdef __SYCL_DEVICE_ONLY__
1187 return host_base_class::getSize().size();
1194 template <
typename CoordT,
1198 #ifdef __SYCL_DEVICE_ONLY__
1200 std::ignore = Coords;
1201 return {0, 0, 0, 0};
1203 return host_base_class::read<DataT>(Coords);
1209 #ifndef __SYCL_DEVICE_ONLY__
1210 : host_base_class{Impl}
1216 template <
class Obj>
1217 friend const decltype(Obj::impl) &
1224 template <
typename DataT,
int Dimensions>
1228 host_sampled_image_accessor<DataT, Dimensions>> {
1229 static_assert(std::is_same_v<DataT, int4> || std::is_same_v<DataT, uint4> ||
1230 std::is_same_v<DataT, float4> ||
1231 std::is_same_v<DataT, half4>,
1232 "The data type of an image accessor must be only int4, "
1233 "uint4, float4 or half4 from SYCL namespace");
1242 template <
typename AllocatorT>
1247 : base_class(detail::convertToArrayOfN<3, 1>(ImageRef.
get_range()),
1257 (
const void *)
typeid(DataT).name(),
sizeof(DataT), CodeLoc);
1275 return Rhs.impl == impl;
1278 return !(Rhs == *
this);
1283 #ifndef __SYCL_DEVICE_ONLY__
1284 return getPropList().template has_property<Property>();
1290 #ifndef __SYCL_DEVICE_ONLY__
1291 return getPropList().template get_property<Property>();
1302 template <
typename CoordT,
1305 DataT
read(
const CoordT &Coords)
const
1306 #ifdef __SYCL_DEVICE_ONLY__
1312 return base_class::read<DataT>(Coords);
1318 : base_class{Impl} {}
1320 template <
class Obj>
1321 friend const decltype(Obj::impl) &
1334 struct hash<
sycl::unsampled_image_accessor<DataT, Dimensions, AccessMode,
1340 #ifdef __SYCL_DEVICE_ONLY__
1346 return hash<decltype(AccImplPtr)>()(AccImplPtr);
1351 template <
typename DataT,
int Dimensions, sycl::access_mode AccessMode>
1353 sycl::host_unsampled_image_accessor<DataT, Dimensions, AccessMode>> {
1359 return hash<decltype(AccImplPtr)>()(AccImplPtr);
1363 template <
typename DataT,
int Dimensions, sycl::image_target AccessTarget>
1364 struct hash<
sycl::sampled_image_accessor<DataT, Dimensions, AccessTarget>> {
1368 #ifdef __SYCL_DEVICE_ONLY__
1374 return hash<decltype(AccImplPtr)>()(AccImplPtr);
1379 template <
typename DataT,
int Dimensions>
1380 struct hash<
sycl::host_sampled_image_accessor<DataT, Dimensions>> {
1385 return hash<decltype(AccImplPtr)>()(AccImplPtr);
The file contains implementations of accessor class.
accessor(sycl::image< Dimensions, AllocatorT > &Image)
accessor(sycl::image< Dimensions, AllocatorT > &Image, const property_list &propList)
unsigned int getElemSize() const
range< 3 > & getAccessRange()
AccessorBaseHost(const AccessorImplPtr &Impl)
SampledImageAccessorImplPtr impl
DataT read(const CoordT &Coords) const
SampledImageAccessorBaseHost(const SampledImageAccessorImplPtr &Impl)
UnsampledImageAccessorBaseHost(const UnsampledImageAccessorImplPtr &Impl)
void write(const CoordT &Coords, const DataT &Color) const
UnsampledImageAccessorImplPtr impl
DataT read(const CoordT &Coords) const noexcept
__SYCL2020_DEPRECATED("get_count() is deprecated, please use size() instead") size_t get_count() const
range< Dims > get_range() const
DataT read(const CoordT &Coords) const
size_t size() const noexcept
void write(const CoordT &Coords, const DataT &Color) const
DataT read(const CoordT &Coords, const sampler &Smpl) const
__image_array_slice__(accessor< DataT, Dimensions, AccessMode, access::target::image_array, IsPlaceholder, ext::oneapi::accessor_property_list<>> BaseAcc, size_t Idx)
size_t size() const noexcept
image_accessor(image< Dims, AllocatorT > &ImageRef, int ImageElementSize)
bool operator!=(const image_accessor &Rhs) const
const DataT & const_reference
__SYCL2020_DEPRECATED("get_count() is deprecated, please use size() instead") size_t get_count() const
friend class sycl::ext::intel::esimd::detail::AccessorPrivateProxy
void write(const CoordT &Coords, const DataT &Color) const
range< Dims > get_range() const
image_accessor(const AccessorImplPtr &Impl)
bool operator==(const image_accessor &Rhs) const
DataT read(const CoordT &Coords) const
DataT read(const CoordT &Coords, const sampler &Smpl) const
image_accessor(image< Dims, AllocatorT > &ImageRef, handler &CommandGroupHandlerRef, int ImageElementSize)
range< Dimensions > get_range() const
size_t size() const noexcept
size_t getElementSize() const
image_sampler getSampler() const noexcept
size_t getRowPitch() const
image_channel_order getChannelOrder() const
size_t getSlicePitch() const
image_channel_type getChannelType() const
The SYCL device class encapsulates a single SYCL device on which kernels may be executed.
bool has(aspect Aspect) const __SYCL_WARN_IMAGE_ASPECT(Aspect)
Indicates if the SYCL device has the given feature.
Command group handler class.
bool has_property() const noexcept
bool operator!=(const host_sampled_image_accessor &Rhs) const
host_sampled_image_accessor(const host_sampled_image_accessor &Rhs)=default
DataT read(const CoordT &Coords) const
host_sampled_image_accessor & operator=(const host_sampled_image_accessor &Rhs)=default
host_sampled_image_accessor(host_sampled_image_accessor &&Rhs)=default
bool operator==(const host_sampled_image_accessor &Rhs) const
Property get_property() const
const DataT & const_reference
~host_sampled_image_accessor()=default
host_sampled_image_accessor(sampled_image< Dimensions, AllocatorT > &ImageRef, const property_list &PropList={}, const detail::code_location CodeLoc=detail::code_location::current())
size_t size() const noexcept
host_sampled_image_accessor & operator=(host_sampled_image_accessor &&Rhs)=default
host_unsampled_image_accessor(unsampled_image< Dimensions, AllocatorT > &ImageRef, const property_list &PropList={}, const detail::code_location CodeLoc=detail::code_location::current())
void write(const CoordT &Coords, const DataT &Color) const
host_unsampled_image_accessor(const host_unsampled_image_accessor &Rhs)=default
~host_unsampled_image_accessor()=default
host_unsampled_image_accessor(host_unsampled_image_accessor &&Rhs)=default
DataT read(const CoordT &Coords) const noexcept
Property get_property() const
bool has_property() const noexcept
bool operator==(const host_unsampled_image_accessor &Rhs) const
typename std::conditional< AccessMode==access_mode::read, const DataT, DataT >::type value_type
host_unsampled_image_accessor & operator=(host_unsampled_image_accessor &&Rhs)=default
const DataT & const_reference
host_unsampled_image_accessor & operator=(const host_unsampled_image_accessor &Rhs)=default
size_t size() const noexcept
bool operator!=(const host_unsampled_image_accessor &Rhs) const
Defines a shared image data.
range< Dimensions > get_range() const
Objects of the property_list class are containers for the SYCL properties.
Defines the iteration domain of either a single work-group in a parallel dispatch,...
bool has_property() const noexcept
sampled_image_accessor(const sampled_image_accessor &Rhs)=default
Property get_property() const
const DataT & const_reference
bool operator==(const sampled_image_accessor &Rhs) const
sampled_image_accessor(sampled_image_accessor &&Rhs)=default
sampled_image_accessor & operator=(sampled_image_accessor &&Rhs)=default
sampled_image_accessor(sampled_image< Dimensions, AllocatorT > &ImageRef, handler &CommandGroupHandlerRef, const property_list &PropList={}, const detail::code_location CodeLoc=detail::code_location::current())
size_t size() const noexcept
sampled_image_accessor & operator=(const sampled_image_accessor &Rhs)=default
DataT read(const CoordT &Coords) const noexcept
~sampled_image_accessor()=default
bool operator!=(const sampled_image_accessor &Rhs) const
DataT read(const CoordT &Coords) const noexcept
bool operator!=(const unsampled_image_accessor &Rhs) const
void write(const CoordT &Coords, const DataT &Color) const
bool has_property() const noexcept
unsampled_image_accessor & operator=(unsampled_image_accessor &&Rhs)=default
~unsampled_image_accessor()=default
size_t size() const noexcept
bool operator==(const unsampled_image_accessor &Rhs) const
Property get_property() const
const DataT & const_reference
unsampled_image_accessor & operator=(const unsampled_image_accessor &Rhs)=default
typename std::conditional< AccessMode==access_mode::read, const DataT, DataT >::type value_type
unsampled_image_accessor(const unsampled_image_accessor &Rhs)=default
unsampled_image_accessor(unsampled_image_accessor &&Rhs)=default
unsampled_image_accessor(unsampled_image< Dimensions, AllocatorT > &ImageRef, handler &CommandGroupHandlerRef, const property_list &PropList={}, const detail::code_location CodeLoc=detail::code_location::current())
#define __SYCL_SPECIAL_CLASS
class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(accessor) accessor< DataT
Image accessors.
class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(accessor) accessor accessor(buffer< DataT, Dimensions, AllocatorT >) -> accessor< DataT, Dimensions, access::mode::read_write, target::device, access::placeholder::true_t >
Buffer accessor.
decltype(Obj::impl) const & getSyclObjImpl(const Obj &SyclObject)
void unsampledImageConstructorNotification(void *ImageObj, void *AccessorObj, const std::optional< image_target > &Target, access::mode Mode, const void *Type, uint32_t ElemSize, const code_location &CodeLoc)
void addHostUnsampledImageAccessorAndWait(UnsampledImageAccessorImplHost *Req)
void addHostAccessorAndWait(AccessorImplHost *Req)
device getDeviceFromHandler(handler &CommandGroupHandlerRef)
std::shared_ptr< UnsampledImageAccessorImplHost > UnsampledImageAccessorImplPtr
void imageWriteHostImpl(const CoordT &Coords, const WriteDataT &Color, id< 3 > ImgPitch, uint8_t ElementSize, image_channel_type ImgChannelType, image_channel_order ImgChannelOrder, void *BasePtr)
void addHostSampledImageAccessorAndWait(SampledImageAccessorImplHost *Req)
boost::mp11::mp_set_contains< TypeList, std::remove_cv_t< T > > is_contained
std::shared_ptr< SampledImageAccessorImplHost > SampledImageAccessorImplPtr
boost::mp11::mp_list< T... > type_list
T createSyclObjFromImpl(decltype(T::impl) ImplObj)
void sampledImageConstructorNotification(void *ImageObj, void *AccessorObj, const std::optional< image_target > &Target, const void *Type, uint32_t ElemSize, const code_location &CodeLoc)
void associateWithHandler(handler &, AccessorBaseHost *, access::target)
std::shared_ptr< AccessorImplHost > AccessorImplPtr
T & operator[](std::ptrdiff_t idx) const noexcept
class __SYCL_EBO __SYCL_SPECIAL_CLASS Dimensions
constexpr mode_tag_t< access_mode::read_write > read_write
class __SYCL_EBO __SYCL_SPECIAL_CLASS IsPlaceholder
class __SYCL_EBO __SYCL_SPECIAL_CLASS AccessMode
std::error_code make_error_code(sycl::errc E) noexcept
Constructs an error code using e and sycl_category()
_Abi const simd< _Tp, _Abi > & noexcept
size_t operator()(const AccType &A) const
size_t operator()(const AccType &A) const
size_t operator()(const AccType &A) const
size_t operator()(const AccType &A) const
static constexpr code_location current(const char *fileName=__CODELOC_FILE_NAME, const char *funcName=__CODELOC_FUNCTION, unsigned long lineNo=__CODELOC_LINE, unsigned long columnNo=__CODELOC_COLUMN) noexcept