8 #ifdef __SYCL_DEVICE_ONLY__
13 inline namespace _V1 {
16 void *ImageObj,
void *AccessorObj,
18 const void *Type, uint32_t ElemSize,
const code_location &CodeLoc);
21 void *ImageObj,
void *AccessorObj,
22 const std::optional<image_target> &Target,
const void *Type,
23 uint32_t ElemSize,
const code_location &CodeLoc);
25 class UnsampledImageAccessorImplHost;
26 class SampledImageAccessorImplHost;
28 std::shared_ptr<UnsampledImageAccessorImplHost>;
30 std::shared_ptr<SampledImageAccessorImplHost>;
44 void *SYCLMemObject,
int Dims,
int ElemSize,
49 void *getMemoryObject()
const;
53 int getNumOfDims()
const;
54 int getElementSize()
const;
55 id<3> getPitch()
const;
72 const auto *this_const =
this;
74 (void)this_const->getSize();
76 (void)this_const->getPtr();
80 #ifndef __SYCL_DEVICE_ONLY__
84 template <
typename DataT,
typename CoordT>
89 return imageReadSamplerHostImpl<CoordT, DataT>(
90 Coords, Smpl, getSize(), getPitch(), getChannelType(),
91 getChannelOrder(), getPtr(), getElementSize());
97 template <
typename DataT,
typename CoordT>
98 void write(
const CoordT &Coords,
const DataT &Color)
const {
100 getChannelType(), getChannelOrder(), getPtr());
112 int Dims,
int ElemSize,
id<3> Pitch,
118 void *getMemoryObject()
const;
121 void *getPtr()
const;
122 int getNumOfDims()
const;
123 int getElementSize()
const;
124 id<3> getPitch()
const;
142 const auto *this_const =
this;
144 (void)this_const->getSize();
146 (void)this_const->getPtr();
150 #ifndef __SYCL_DEVICE_ONLY__
154 template <
typename DataT,
typename CoordT>
155 DataT
read(
const CoordT &Coords)
const {
156 return imageReadSamplerHostImpl<CoordT, DataT>(
157 Coords, getSampler(), getSize(), getPitch(), getChannelType(),
158 getChannelOrder(), getPtr(), getElementSize());
165 class __image_array_slice__;
171 #ifndef __SYCL_DEVICE_ONLY__
181 OCLImageTy MImageObj;
187 void imageAccessorInit(OCLImageTy Image) { MImageObj = Image; }
191 template <
typename T1,
int T2, access::mode T3, access::placeholder T4>
194 constexpr
static bool IsHostImageAcc =
199 constexpr
static bool IsImageArrayAcc =
202 constexpr
static bool IsImageAccessWriteOnly =
206 constexpr
static bool IsImageAccessAnyWrite =
209 constexpr
static bool IsImageAccessReadOnly =
212 constexpr
static bool IsImageAccessAnyRead =
219 "The data type of an image accessor must be only cl_int4, "
220 "cl_uint4, cl_float4 or cl_half4 from SYCL namespace");
222 static_assert(IsImageAcc || IsHostImageAcc || IsImageArrayAcc,
223 "Expected image type");
226 "Expected false as Placeholder value for image accessor.");
229 ((IsImageAcc || IsImageArrayAcc) &&
230 (IsImageAccessWriteOnly || IsImageAccessReadOnly)) ||
231 (IsHostImageAcc && (IsImageAccessAnyWrite || IsImageAccessAnyRead)),
232 "Access modes can be only read/write/discard_write for image/image_array "
233 "target accessor, or they can be only "
234 "read/write/discard_write/read_write for host_image target accessor.");
237 "Dimensions can be 1/2/3 for image accessor.");
239 #ifdef __SYCL_DEVICE_ONLY__
242 return __invoke_ImageQuerySize<sycl::vec<int, Dimensions>, OCLImageTy>(
246 size_t getElementSize()
const {
247 int ChannelType = __invoke_ImageQueryFormat<int, OCLImageTy>(MImageObj);
248 int ChannelOrder = __invoke_ImageQueryOrder<int, OCLImageTy>(MImageObj);
249 int ElementSize = getSPIRVElementSize(ChannelType, ChannelOrder);
259 "image::getRangeInternal() is not implemented for host");
265 #ifndef __SYCL_DEVICE_ONLY__
273 #ifdef __SYCL_DEVICE_ONLY__
274 const OCLImageTy getNativeImageObj()
const {
return MImageObj; }
284 #ifdef __SYCL_DEVICE_ONLY__
294 typename = std::enable_if_t<(Dims > 0 && Dims <= 3) && IsHostImageAcc>>
296 #ifdef __SYCL_DEVICE_ONLY__
299 (void)ImageElementSize;
305 detail::convertToArrayOfN<3, 1>(ImageRef.
get_range()),
306 detail::convertToArrayOfN<3, 1>(ImageRef.
get_range()),
309 MImageCount(ImageRef.
size()),
310 MImgChannelOrder(ImageRef.getChannelOrder()),
311 MImgChannelType(ImageRef.getChannelType()) {
320 template <
typename AllocatorT,
int Dims =
Dimensions,
321 typename = std::enable_if_t<(Dims > 0 && Dims <= 3) && IsImageAcc>>
323 handler &CommandGroupHandlerRef,
int ImageElementSize)
324 #ifdef __SYCL_DEVICE_ONLY__
327 (void)CommandGroupHandlerRef;
328 (void)ImageElementSize;
334 detail::convertToArrayOfN<3, 1>(ImageRef.
get_range()),
335 detail::convertToArrayOfN<3, 1>(ImageRef.
get_range()),
338 MImageCount(ImageRef.
size()),
339 MImgChannelOrder(ImageRef.getChannelOrder()),
340 MImgChannelType(ImageRef.getChannelType()) {
343 if (!Device.
has(aspect::ext_intel_legacy_image))
345 sycl::errc::feature_not_supported,
346 "SYCL 1.2.1 images are not supported by this device.");
354 #ifndef __SYCL_DEVICE_ONLY__
373 #ifdef __SYCL_DEVICE_ONLY__
376 size_t get_count()
const {
return size(); }
377 size_t size() const
noexcept {
return get_range<Dimensions>().size(); }
379 template <
int Dims = Dimensions,
typename = std::enable_if_t<Dims == 1>>
381 int Range = getRangeInternal();
384 template <
int Dims = Dimensions,
typename = std::enable_if_t<Dims == 2>>
386 int2 Range = getRangeInternal();
387 return range<2>(Range[0], Range[1]);
389 template <
int Dims = Dimensions,
typename = std::enable_if_t<Dims == 3>>
391 int3 Range = getRangeInternal();
392 return range<3>(Range[0], Range[1], Range[2]);
397 size_t get_count()
const {
return size(); };
400 template <
int Dims = Dimensions,
typename = std::enable_if_t<(Dims > 0)>>
411 template <
typename CoordT,
int Dims =
Dimensions,
412 typename = std::enable_if_t<
414 (detail::is_genint_v<CoordT>) &&
415 ((IsImageAcc && IsImageAccessReadOnly) ||
416 (IsHostImageAcc && IsImageAccessAnyRead))>>
417 DataT
read(
const CoordT &Coords)
const {
418 #ifdef __SYCL_DEVICE_ONLY__
419 return __invoke__ImageRead<DataT, OCLImageTy, CoordT>(MImageObj, Coords);
423 return read<CoordT, Dims>(Coords, Smpl);
431 template <
typename CoordT,
int Dims =
Dimensions,
432 typename = std::enable_if_t<
434 ((IsImageAcc && IsImageAccessReadOnly) ||
435 (IsHostImageAcc && IsImageAccessAnyRead))>>
436 DataT
read(
const CoordT &Coords,
const sampler &Smpl)
const {
437 #ifdef __SYCL_DEVICE_ONLY__
438 return __invoke__ImageReadSampler<DataT, OCLImageTy, CoordT>(
439 MImageObj, Coords, Smpl.impl.m_Sampler);
441 return imageReadSamplerHostImpl<CoordT, DataT>(
443 getOffset() , MImgChannelType, MImgChannelOrder,
457 typename = std::enable_if_t<(Dims > 0) && (detail::is_genint_v<CoordT>) &&
459 ((IsImageAcc && IsImageAccessWriteOnly) ||
460 (IsHostImageAcc && IsImageAccessAnyWrite))>>
461 void write(
const CoordT &Coords,
const DataT &Color)
const {
462 #ifdef __SYCL_DEVICE_ONLY__
463 __invoke__ImageWrite<OCLImageTy, CoordT, DataT>(MImageObj, Coords, Color);
478 "Image slice cannot have more then 2 dimensions");
482 template <
typename CoordT,
typename CoordElemType = get_elem_type_t<CoordT>>
484 getAdjustedCoords(
const CoordT &Coords)
const {
485 CoordElemType LastCoord = 0;
487 if (std::is_same<float, CoordElemType>::value) {
490 MIdx /
static_cast<float>(Size.template swizzle<Dimensions>());
498 return AdjustedCoords;
507 : MBaseAcc(BaseAcc), MIdx(Idx) {}
509 template <
typename CoordT,
int Dims =
Dimensions,
510 typename = std::enable_if_t<
512 DataT
read(
const CoordT &Coords)
const {
513 return MBaseAcc.read(getAdjustedCoords(Coords));
516 template <
typename CoordT,
int Dims =
Dimensions,
517 typename = std::enable_if_t<(Dims > 0) &&
519 DataT
read(
const CoordT &Coords,
const sampler &Smpl)
const {
520 return MBaseAcc.read(getAdjustedCoords(Coords), Smpl);
523 template <
typename CoordT,
int Dims =
Dimensions,
524 typename = std::enable_if_t<(Dims > 0) &&
526 void write(
const CoordT &Coords,
const DataT &Color)
const {
527 return MBaseAcc.write(getAdjustedCoords(Coords), Color);
530 #ifdef __SYCL_DEVICE_ONLY__
532 size_t get_count()
const {
return size(); }
533 size_t size() const
noexcept {
return get_range<Dimensions>().size(); }
535 template <
int Dims = Dimensions,
typename = std::enable_if_t<Dims == 1>>
537 int2 Count = MBaseAcc.getRangeInternal();
540 template <
int Dims = Dimensions,
typename = std::enable_if_t<Dims == 2>>
542 int3 Count = MBaseAcc.getRangeInternal();
543 return range<2>(Count.x(), Count.y());
549 size_t get_count()
const {
return size(); }
551 return MBaseAcc.MImageCount / MBaseAcc.getAccessRange()[
Dimensions];
555 typename = std::enable_if_t<(Dims == 1 || Dims == 2)>>
557 return detail::convertToArrayOfN<Dims, 1>(MBaseAcc.getAccessRange());
579 :
public detail::image_accessor<DataT, Dimensions, AccessMode,
580 access::target::image, IsPlaceholder>,
581 public detail::OwnerLessBase<
582 accessor<DataT, Dimensions, AccessMode, access::target::image,
590 template <
typename AllocatorT>
595 Image, CommandGroupHandler, Image.getElementSize()) {
596 #ifndef __SYCL_DEVICE_ONLY__
602 template <
typename AllocatorT>
607 Image, CommandGroupHandler, Image.getElementSize()) {
609 #ifndef __SYCL_DEVICE_ONLY__
614 #ifdef __SYCL_DEVICE_ONLY__
622 void __init(OCLImageTy Image) { this->imageAccessorInit(Image); }
625 void __init_esimd(OCLImageTy Image) { this->imageAccessorInit(Image); }
645 access::target::host_image, IsPlaceholder>,
647 accessor<DataT, Dimensions, AccessMode, access::target::host_image,
650 template <
typename AllocatorT>
654 Image, Image.getElementSize()) {}
656 template <
typename AllocatorT>
661 Image, Image.getElementSize()) {
678 :
public detail::image_accessor<DataT, Dimensions + 1, AccessMode,
679 access::target::image, IsPlaceholder>,
680 public detail::OwnerLessBase<
681 accessor<DataT, Dimensions, AccessMode, access::target::image_array,
683 #ifdef __SYCL_DEVICE_ONLY__
691 void __init(OCLImageTy Image) { this->imageAccessorInit(Image); }
694 void __init_esimd(OCLImageTy Image) { this->imageAccessorInit(Image); }
701 template <
typename AllocatorT>
703 handler &CommandGroupHandler)
706 Image, CommandGroupHandler, Image.getElementSize()) {
707 #ifndef __SYCL_DEVICE_ONLY__
713 template <
typename AllocatorT>
715 handler &CommandGroupHandler,
const property_list &propList)
718 Image, CommandGroupHandler, Image.getElementSize()) {
720 #ifndef __SYCL_DEVICE_ONLY__
726 detail::__image_array_slice__<DataT, Dimensions, AccessMode, IsPlaceholder>
738 #ifndef __SYCL_DEVICE_ONLY__
742 unsampled_image_accessor<DataT, Dimensions, AccessMode, AccessTarget>> {
743 static_assert(std::is_same_v<DataT, int4> || std::is_same_v<DataT, uint4> ||
744 std::is_same_v<DataT, float4> ||
745 std::is_same_v<DataT, half4>,
746 "The data type of an image accessor must be only int4, "
747 "uint4, float4 or half4 from SYCL namespace");
750 "Access mode must be either read or write.");
752 #ifdef __SYCL_DEVICE_ONLY__
760 const DataT, DataT>::type;
764 template <
typename AllocatorT>
769 #ifdef __SYCL_DEVICE_ONLY__
772 (void)CommandGroupHandlerRef;
777 : host_base_class(detail::convertToArrayOfN<3, 1>(ImageRef.
get_range()),
780 {ImageRef.getRowPitch(), ImageRef.getSlicePitch(), 0},
785 aspect ImageAspect = aspect::image;
789 "Device associated with command group handler does not have "
794 AccessMode, (
const void *)
typeid(DataT).name(),
sizeof(DataT), CodeLoc);
813 #ifdef __SYCL_DEVICE_ONLY__
817 return Rhs.impl == impl;
822 return !(Rhs == *
this);
827 #ifndef __SYCL_DEVICE_ONLY__
828 return getPropList().template has_property<Property>();
834 #ifndef __SYCL_DEVICE_ONLY__
835 return getPropList().template get_property<Property>();
842 #ifdef __SYCL_DEVICE_ONLY__
846 return host_base_class::getSize().size();
854 template <
typename CoordT,
859 #ifdef __SYCL_DEVICE_ONLY__
861 std::ignore = Coords;
864 return host_base_class::read<DataT>(Coords);
872 template <
typename CoordT,
876 void write(
const CoordT &Coords,
const DataT &Color)
const {
877 #ifdef __SYCL_DEVICE_ONLY__
879 std::ignore = Coords;
882 host_base_class::write<DataT>(Coords, Color);
888 #ifndef __SYCL_DEVICE_ONLY__
889 : host_base_class{Impl}
910 static_assert(std::is_same_v<DataT, int4> || std::is_same_v<DataT, uint4> ||
911 std::is_same_v<DataT, float4> ||
912 std::is_same_v<DataT, half4>,
913 "The data type of an image accessor must be only int4, "
914 "uint4, float4 or half4 from SYCL namespace");
920 const DataT, DataT>::type;
924 template <
typename AllocatorT>
929 : base_class(detail::convertToArrayOfN<3, 1>(ImageRef.
get_range()),
939 AccessMode, (
const void *)
typeid(DataT).name(),
sizeof(DataT), CodeLoc);
958 return Rhs.impl == impl;
961 return !(Rhs == *
this);
966 #ifndef __SYCL_DEVICE_ONLY__
967 return getPropList().template has_property<Property>();
973 #ifndef __SYCL_DEVICE_ONLY__
974 return getPropList().template get_property<Property>();
989 typename = std::enable_if_t<
994 #ifdef __SYCL_DEVICE_ONLY__
1000 return base_class::read<DataT>(Coords);
1011 typename = std::enable_if_t<
1015 void write(
const CoordT &Coords,
const DataT &Color)
const
1016 #ifdef __SYCL_DEVICE_ONLY__
1022 base_class::write<DataT>(Coords, Color);
1029 : base_class{Impl} {}
1031 template <
class Obj>
1041 #ifndef __SYCL_DEVICE_ONLY__
1045 sampled_image_accessor<DataT, Dimensions, AccessTarget>> {
1046 static_assert(std::is_same_v<DataT, int4> || std::is_same_v<DataT, uint4> ||
1047 std::is_same_v<DataT, float4> ||
1048 std::is_same_v<DataT, half4>,
1049 "The data type of an image accessor must be only int4, "
1050 "uint4, float4 or half4 from SYCL namespace");
1052 #ifdef __SYCL_DEVICE_ONLY__
1063 template <
typename AllocatorT>
1068 #ifdef __SYCL_DEVICE_ONLY__
1071 (void)CommandGroupHandlerRef;
1076 : host_base_class(detail::convertToArrayOfN<3, 1>(ImageRef.
get_range()),
1079 {ImageRef.getRowPitch(), ImageRef.getSlicePitch(), 0},
1084 aspect ImageAspect = aspect::image;
1088 "Device associated with command group handler does not have "
1093 (
const void *)
typeid(DataT).name(),
sizeof(DataT), CodeLoc);
1112 #ifdef __SYCL_DEVICE_ONLY__
1116 return Rhs.impl == impl;
1121 return !(Rhs == *
this);
1126 #ifndef __SYCL_DEVICE_ONLY__
1127 return getPropList().template has_property<Property>();
1133 #ifndef __SYCL_DEVICE_ONLY__
1134 return getPropList().template get_property<Property>();
1141 #ifdef __SYCL_DEVICE_ONLY__
1145 return host_base_class::getSize().size();
1152 template <
typename CoordT,
1156 #ifdef __SYCL_DEVICE_ONLY__
1158 std::ignore = Coords;
1159 return {0, 0, 0, 0};
1161 return host_base_class::read<DataT>(Coords);
1167 #ifndef __SYCL_DEVICE_ONLY__
1168 : host_base_class{Impl}
1174 template <
class Obj>
1181 template <
typename DataT,
int Dimensions>
1185 host_sampled_image_accessor<DataT, Dimensions>> {
1186 static_assert(std::is_same_v<DataT, int4> || std::is_same_v<DataT, uint4> ||
1187 std::is_same_v<DataT, float4> ||
1188 std::is_same_v<DataT, half4>,
1189 "The data type of an image accessor must be only int4, "
1190 "uint4, float4 or half4 from SYCL namespace");
1199 template <
typename AllocatorT>
1204 : base_class(detail::convertToArrayOfN<3, 1>(ImageRef.
get_range()),
1214 (
const void *)
typeid(DataT).name(),
sizeof(DataT), CodeLoc);
1232 return Rhs.impl == impl;
1235 return !(Rhs == *
this);
1240 #ifndef __SYCL_DEVICE_ONLY__
1241 return getPropList().template has_property<Property>();
1247 #ifndef __SYCL_DEVICE_ONLY__
1248 return getPropList().template get_property<Property>();
1259 template <
typename CoordT,
1262 DataT
read(
const CoordT &Coords)
const
1263 #ifdef __SYCL_DEVICE_ONLY__
1269 return base_class::read<DataT>(Coords);
1275 : base_class{Impl} {}
1277 template <
class Obj>
1290 struct hash<
sycl::unsampled_image_accessor<DataT, Dimensions, AccessMode,
1296 #ifdef __SYCL_DEVICE_ONLY__
1302 return hash<decltype(AccImplPtr)>()(AccImplPtr);
1307 template <
typename DataT,
int Dimensions, sycl::access_mode AccessMode>
1309 sycl::host_unsampled_image_accessor<DataT, Dimensions, AccessMode>> {
1315 return hash<decltype(AccImplPtr)>()(AccImplPtr);
1319 template <
typename DataT,
int Dimensions, sycl::image_target AccessTarget>
1320 struct hash<
sycl::sampled_image_accessor<DataT, Dimensions, AccessTarget>> {
1324 #ifdef __SYCL_DEVICE_ONLY__
1330 return hash<decltype(AccImplPtr)>()(AccImplPtr);
1335 template <
typename DataT,
int Dimensions>
1336 struct hash<
sycl::host_sampled_image_accessor<DataT, Dimensions>> {
1341 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())
class sycl::vec ///////////////////////// Provides a cross-patform vector class template that works e...
#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.
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)
std::shared_ptr< SampledImageAccessorImplHost > SampledImageAccessorImplPtr
decltype(Obj::impl) getSyclObjImpl(const Obj &SyclObject)
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