39 #include <type_traits>
43 inline namespace _V1 {
48 template <
int D,
typename A>
class image;
51 template <backend Backend,
int D,
typename A>
52 std::enable_if_t<Backend == backend::ext_oneapi_level_zero, image<D, A>>
54 const context &TargetContext,
event AvailableEvent = {});
107 using byte =
unsigned char;
116 template <
typename T>
121 template <
typename DataT>
123 typename std::enable_if_t<is_validImageDataT<DataT>::value, DataT>;
150 "Unrecognized channel type.");
170 "Unrecognized channel order.");
176 image_plain(
const std::shared_ptr<detail::image_impl> &Impl) : impl{Impl} {}
180 std::unique_ptr<SYCLMemObjAllocator> Allocator,
185 std::unique_ptr<SYCLMemObjAllocator> Allocator,
190 std::unique_ptr<SYCLMemObjAllocator> Allocator,
195 std::unique_ptr<SYCLMemObjAllocator> Allocator,
201 std::unique_ptr<SYCLMemObjAllocator> Allocator,
204 image_plain(
const std::shared_ptr<const void> &HostPointer,
207 std::unique_ptr<SYCLMemObjAllocator> Allocator,
211 image_plain(
const std::shared_ptr<const void> &HostPointer,
214 std::unique_ptr<SYCLMemObjAllocator> Allocator,
221 std::unique_ptr<SYCLMemObjAllocator> Allocator,
227 std::unique_ptr<SYCLMemObjAllocator> Allocator,
230 image_plain(
const std::shared_ptr<const void> &HostPointer,
233 std::unique_ptr<SYCLMemObjAllocator> Allocator,
236 image_plain(
const std::shared_ptr<const void> &HostPointer,
240 std::unique_ptr<SYCLMemObjAllocator> Allocator,
243 #ifdef __SYCL_INTERNAL_API
245 event AvailableEvent,
246 std::unique_ptr<SYCLMemObjAllocator> Allocator,
251 event AvailableEvent,
252 std::unique_ptr<SYCLMemObjAllocator> Allocator,
261 range<3> get_range() const;
269 void set_final_data_internal();
271 void set_final_data_internal(
272 const
std::function<
void(const
std::function<
void(
void *const Ptr)> &)>
275 void set_write_back(
bool flag);
279 size_t getElementSize() const;
281 size_t getRowPitch() const;
283 size_t getSlicePitch() const;
292 void *UserObj, const
void *HostObj,
293 uint32_t Dim,
size_t Range[3],
296 void sampledImageDestructorNotification(
void *UserObj);
299 const detail::
code_location &CodeLoc,
void *UserObj, const
void *HostObj,
301 void unsampledImageDestructorNotification(
void *UserObj);
307 template <
int Dimensions, typename AllocatorT>
316 return image_plain::template has_property<propertyT>();
320 return image_plain::get_property<propertyT>();
328 template <
bool IsMultiDim = (Dimensions > 1)>
340 ->template getAllocator<AllocatorT>();
345 template <
int Dimensions,
typename AllocatorT>
352 using common_base::image_common;
355 template <
typename Destination = std::
nullptr_t>
357 this->set_final_data_internal(finalData);
363 void set_final_data_internal(std::nullptr_t) {
364 common_base::set_final_data_internal();
367 template <
template <
typename WeakT>
class WeakPtrT,
typename WeakT>
369 std::is_convertible<WeakPtrT<WeakT>, std::weak_ptr<WeakT>>::value>
370 set_final_data_internal(WeakPtrT<WeakT> FinalData) {
371 std::weak_ptr<WeakT> TempFinalData(FinalData);
372 this->set_final_data_internal(TempFinalData);
375 template <
typename WeakT>
376 void set_final_data_internal(std::weak_ptr<WeakT> FinalData) {
377 common_base::set_final_data_internal(
378 [FinalData](
const std::function<
void(
void *
const Ptr)> &F) {
379 if (std::shared_ptr<WeakT> LockedFinalData = FinalData.lock())
380 F(LockedFinalData.get());
384 template <
typename Destination>
385 detail::EnableIfOutputPointerT<Destination>
386 set_final_data_internal(Destination FinalData) {
388 common_base::set_final_data_internal();
390 common_base::set_final_data_internal(
391 [FinalData](
const std::function<
void(
void *
const Ptr)> &F) {
396 template <
typename Destination>
397 detail::EnableIfOutputIteratorT<Destination>
398 set_final_data_internal(Destination FinalData) {
399 const size_t Size = common_base::size();
400 common_base::set_final_data_internal(
401 [FinalData, Size](
const std::function<
void(
void *
const Ptr)> &F) {
402 using DestinationValueT = detail::iterator_value_type_t<Destination>;
406 std::unique_ptr<DestinationValueT[]> ContiguousStorage(
407 new DestinationValueT[Size]);
408 F(ContiguousStorage.get());
409 std::copy(ContiguousStorage.get(), ContiguousStorage.get() + Size,
415 template <
typename DataT,
int Dims,
access::mode AccMode,
417 class image_accessor;
423 class unsampled_image_accessor;
425 template <
typename DataT,
int Dimensions, access_mode AccessMode>
426 class host_unsampled_image_accessor;
428 template <
typename DataT,
int Dimensions, image_target AccessTarget>
429 class sampled_image_accessor;
431 template <
typename DataT,
int Dimensions>
class host_sampled_image_accessor;
442 template <
int Dimensions = 1,
typename AllocatorT = sycl::image_allocator>
451 : common_base(Order, Type, detail::convertToArrayOfN<3, 1>(Range),
460 Order, Type, detail::convertToArrayOfN<3, 1>(Range),
466 template <
bool B = (Dimensions > 1)>
471 : common_base(Order, Type, detail::convertToArrayOfN<3, 1>(Range),
472 detail::convertToArrayOfN<2, 0>(Pitch),
478 template <
bool B = (Dimensions > 1)>
484 Order, Type, detail::convertToArrayOfN<3, 1>(Range),
485 detail::convertToArrayOfN<2, 0>(Pitch),
492 : common_base(HostPointer, Order, Type,
493 detail::convertToArrayOfN<3, 1>(Range),
502 HostPointer, Order, Type, detail::convertToArrayOfN<3, 1>(Range),
510 : common_base(HostPointer, Order, Type,
511 detail::convertToArrayOfN<3, 1>(Range),
520 HostPointer, Order, Type, detail::convertToArrayOfN<3, 1>(Range),
526 template <
bool B = (Dimensions > 1)>
531 : common_base(HostPointer, Order, Type,
532 detail::convertToArrayOfN<3, 1>(Range),
533 detail::convertToArrayOfN<2, 0>(Pitch),
539 template <
bool B = (Dimensions > 1)>
545 HostPointer, Order, Type, detail::convertToArrayOfN<3, 1>(Range),
546 detail::convertToArrayOfN<2, 0>(Pitch),
554 : common_base(HostPointer, Order, Type,
555 detail::convertToArrayOfN<3, 1>(Range),
564 HostPointer, Order, Type, detail::convertToArrayOfN<3, 1>(Range),
570 template <
bool B = (Dimensions > 1)>
575 : common_base(HostPointer, Order, Type,
576 detail::convertToArrayOfN<3, 1>(Range),
577 detail::convertToArrayOfN<2, 0>(Pitch),
583 template <
bool B = (Dimensions > 1)>
589 HostPointer, Order, Type, detail::convertToArrayOfN<3, 1>(Range),
590 detail::convertToArrayOfN<2, 0>(Pitch),
595 #ifdef __SYCL_INTERNAL_API
597 event AvailableEvent = {})
598 : common_base(ClMemObject, SyclContext, AvailableEvent,
600 detail::SYCLMemObjAllocatorHolder<AllocatorT, byte>>(),
622 return common_base::template has_property<propertyT>();
626 return common_base::template get_property<propertyT>();
630 return detail::convertToArrayOfN<Dimensions, 0>(common_base::get_range());
634 template <
bool B = (Dimensions > 1)>
641 size_t get_size()
const {
return common_base::get_size(); }
645 size_t get_count()
const {
return common_base::size(); }
647 template <
typename DataT, access::mode AccessMode>
655 commandGroupHandler);
658 template <
typename DataT, access::mode AccessMode>
672 : common_base(MemObject, SyclContext, AvailableEvent,
674 detail::SYCLMemObjAllocatorHolder<AllocatorT,
byte>>(),
681 size_t getElementSize()
const {
return common_base::getElementSize(); }
683 size_t getRowPitch()
const {
return common_base::getRowPitch(); }
685 size_t getSlicePitch()
const {
return common_base::getSlicePitch(); }
688 return common_base::getChannelOrder();
692 return common_base::getChannelType();
696 template <backend Backend,
int D,
typename A>
697 friend std::enable_if_t<
706 template <backend Backend,
int D,
typename A>
715 template <
typename DataT,
int Dims,
access::mode AccMode,
717 typename PropertyListT>
720 template <
typename DataT,
int Dims,
access::mode AccMode,
725 template <
int Dimensions = 1,
typename AllocatorT = sycl::image_allocator>
734 : common_base{Impl} {}
743 detail::convertToArrayOfN<3, 1>(Range),
748 CodeLoc, (
void *)this->impl.get(),
nullptr,
Dimensions,
759 detail::convertToArrayOfN<3, 1>(Range),
764 CodeLoc, (
void *)this->impl.get(),
nullptr,
Dimensions,
768 template <
bool IsMultiDim = (Dimensions > 1),
769 typename = std::enable_if_t<IsMultiDim>>
776 detail::convertToArrayOfN<3, 1>(Range),
777 detail::convertToArrayOfN<2, 0>(Pitch),
782 CodeLoc, (
void *)this->impl.get(),
nullptr,
Dimensions,
786 template <
bool IsMultiDim = (Dimensions > 1),
787 typename = std::enable_if_t<IsMultiDim>>
796 detail::convertToArrayOfN<3, 1>(Range),
797 detail::convertToArrayOfN<2, 0>(Pitch),
802 CodeLoc, (
void *)this->impl.get(),
nullptr,
Dimensions,
812 detail::convertToArrayOfN<3, 1>(Range),
817 CodeLoc, (
void *)this->impl.get(), HostPointer,
Dimensions,
828 detail::convertToArrayOfN<3, 1>(Range),
833 CodeLoc, (
void *)this->impl.get(), HostPointer,
Dimensions,
837 template <
bool IsMultiDim = (Dimensions > 1),
838 typename = std::enable_if_t<IsMultiDim>>
845 detail::convertToArrayOfN<3, 1>(Range),
846 detail::convertToArrayOfN<2, 0>(Pitch),
851 CodeLoc, (
void *)this->impl.get(), HostPointer,
Dimensions,
855 template <
bool IsMultiDim = (Dimensions > 1),
856 typename = std::enable_if_t<IsMultiDim>>
865 detail::convertToArrayOfN<3, 1>(Range),
866 detail::convertToArrayOfN<2, 0>(Pitch),
871 CodeLoc, (
void *)this->impl.get(), HostPointer,
Dimensions,
876 std::shared_ptr<void> &HostPointer,
image_format Format,
881 detail::convertToArrayOfN<3, 1>(Range),
886 CodeLoc, (
void *)this->impl.get(), HostPointer.get(),
Dimensions,
891 std::shared_ptr<void> &HostPointer,
image_format Format,
898 detail::convertToArrayOfN<3, 1>(Range),
903 CodeLoc, (
void *)this->impl.get(), HostPointer.get(),
Dimensions,
907 template <
bool IsMultiDim = (Dimensions > 1),
908 typename = std::enable_if_t<IsMultiDim>>
910 std::shared_ptr<void> &HostPointer,
image_format Format,
916 detail::convertToArrayOfN<3, 1>(Range),
917 detail::convertToArrayOfN<2, 0>(Pitch),
922 CodeLoc, (
void *)this->impl.get(), HostPointer.get(),
Dimensions,
926 template <
bool IsMultiDim = (Dimensions > 1),
927 typename = std::enable_if_t<IsMultiDim>>
929 std::shared_ptr<void> &HostPointer,
image_format Format,
936 detail::convertToArrayOfN<3, 1>(Range),
937 detail::convertToArrayOfN<2, 0>(Pitch),
942 CodeLoc, (
void *)this->impl.get(), HostPointer.get(),
Dimensions,
957 common_base::unsampledImageDestructorNotification((
void *)this->impl.get());
961 return this->impl == rhs.
impl;
968 using common_base::size;
970 template <
typename DataT,
979 return {*
this, CommandGroupHandlerRef, PropList, CodeLoc};
982 template <
typename DataT,
989 return {*
this, PropList, CodeLoc};
999 template <
typename DataT,
int Dims, access_mode AccessMode>
1007 template <
int Dimensions = 1,
typename AllocatorT = sycl::image_allocator>
1014 sampled_image(
const std::shared_ptr<detail::image_impl> &Impl)
1015 : common_base{Impl} {}
1024 detail::convertToArrayOfN<3, 1>(Range),
1029 CodeLoc, (
void *)this->impl.get(),
nullptr,
Dimensions,
1033 template <
bool IsMultiDim = (Dimensions > 1),
1034 typename = std::enable_if_t<IsMultiDim>>
1042 detail::convertToArrayOfN<3, 1>(Range),
1043 detail::convertToArrayOfN<2, 0>(Pitch),
1048 CodeLoc, (
void *)this->impl.get(), HostPointer,
Dimensions,
1053 std::shared_ptr<const void> &HostPointer,
image_format Format,
1059 detail::convertToArrayOfN<3, 1>(Range),
1064 CodeLoc, (
void *)this->impl.get(), HostPointer.get(),
Dimensions,
1068 template <
bool IsMultiDim = (Dimensions > 1),
1069 typename = std::enable_if_t<IsMultiDim>>
1071 std::shared_ptr<const void> &HostPointer,
image_format Format,
1077 detail::convertToArrayOfN<3, 1>(Range),
1078 detail::convertToArrayOfN<2, 0>(Pitch),
1083 CodeLoc, (
void *)this->impl.get(), HostPointer.get(),
Dimensions,
1098 common_base::sampledImageDestructorNotification((
void *)this->impl.get());
1102 return this->impl == rhs.
impl;
1109 template <
typename DataT, image_target AccessTarget = image_target::device>
1113 return {*
this, CommandGroupHandlerRef, PropList, CodeLoc};
1116 template <
typename DataT>
1120 return {*
this, PropList, CodeLoc};
1124 template <
class Obj>
1132 template <
typename DataT,
int Dims, image_target AccessTarget>
1140 template <
int Dimensions,
typename AllocatorT>
1141 struct hash<
sycl::image<Dimensions, AllocatorT>> {
1143 return hash<std::shared_ptr<sycl::detail::image_impl>>()(
1148 template <
int Dimensions,
typename AllocatorT>
1149 struct hash<
sycl::unsampled_image<Dimensions, AllocatorT>> {
1152 return hash<std::shared_ptr<sycl::detail::image_impl>>()(
1157 template <
int Dimensions,
typename AllocatorT>
1158 struct hash<
sycl::sampled_image<Dimensions, AllocatorT>> {
1161 return hash<std::shared_ptr<sycl::detail::image_impl>>()(
The context class represents a SYCL context on which kernel functions may be executed.
propertyT get_property() const
AllocatorT get_allocator() const
range< Dimensions > get_range() const
bool has_property() const noexcept
std::enable_if_t< IsMultiDim, range< Dimensions - 1 > > get_pitch() const
size_t size() const noexcept
size_t get_count() const noexcept
range< 2 > get_pitch() const
bool has_property() const noexcept
range< 3 > get_range() const
std::shared_ptr< detail::image_impl > impl
const std::unique_ptr< SYCLMemObjAllocator > & get_allocator_internal() const
image_plain(const std::shared_ptr< detail::image_impl > &Impl)
void set_final_data(Destination finalData=nullptr)
void set_write_back(bool flag=true)
An event object can be used to synchronize memory transfers, enqueues of kernels and signaling barrie...
Command group handler class.
Defines a shared image data.
image(std::shared_ptr< void > &HostPointer, image_channel_order Order, image_channel_type Type, const range< Dimensions > &Range, const typename std::enable_if_t< B, range< Dimensions - 1 >> &Pitch, const property_list &PropList={})
std::enable_if_t< B, range< Dimensions - 1 > > get_pitch() const
image(const image &rhs)=default
image(void *HostPointer, image_channel_order Order, image_channel_type Type, const range< Dimensions > &Range, const property_list &PropList={})
image(std::shared_ptr< void > &HostPointer, image_channel_order Order, image_channel_type Type, const range< Dimensions > &Range, const property_list &PropList={})
image(image_channel_order Order, image_channel_type Type, const range< Dimensions > &Range, AllocatorT Allocator, const property_list &PropList={})
accessor< detail::EnableIfImgAccDataT< DataT >, Dimensions, AccessMode, access::target::image, access::placeholder::false_t, ext::oneapi::accessor_property_list<> > get_access(handler &commandGroupHandler)
image(std::shared_ptr< void > &HostPointer, image_channel_order Order, image_channel_type Type, const range< Dimensions > &Range, const typename std::enable_if_t< B, range< Dimensions - 1 >> &Pitch, AllocatorT Allocator, const property_list &PropList={})
image(std::shared_ptr< void > &HostPointer, image_channel_order Order, image_channel_type Type, const range< Dimensions > &Range, AllocatorT Allocator, const property_list &PropList={})
image(image_channel_order Order, image_channel_type Type, const range< Dimensions > &Range, const typename std::enable_if_t< B, range< Dimensions - 1 >> &Pitch, const property_list &PropList={})
image(image_channel_order Order, image_channel_type Type, const range< Dimensions > &Range, const typename std::enable_if_t< B, range< Dimensions - 1 >> &Pitch, AllocatorT Allocator, const property_list &PropList={})
image(const void *HostPointer, image_channel_order Order, image_channel_type Type, const range< Dimensions > &Range, AllocatorT Allocator, const property_list &PropList={})
bool operator!=(const image &rhs) const
range< Dimensions > get_range() const
image(image &&rhs)=default
image(void *HostPointer, image_channel_order Order, image_channel_type Type, const range< Dimensions > &Range, AllocatorT Allocator, const property_list &PropList={})
image(const void *HostPointer, image_channel_order Order, image_channel_type Type, const range< Dimensions > &Range, const property_list &PropList={})
accessor< detail::EnableIfImgAccDataT< DataT >, Dimensions, AccessMode, access::target::host_image, access::placeholder::false_t, ext::oneapi::accessor_property_list<> > get_access()
image(void *HostPointer, image_channel_order Order, image_channel_type Type, const range< Dimensions > &Range, const typename std::enable_if_t< B, range< Dimensions - 1 >> &Pitch, const property_list &PropList={})
__SYCL2020_DEPRECATED("get_count() is deprecated, please use size() instead") size_t get_count() const
friend std::enable_if_t< Backend==backend::ext_oneapi_level_zero, image< D, A > > make_image(const backend_input_t< Backend, image< D, A >> &BackendObject, const context &TargetContext, event AvailableEvent)
image & operator=(image &&rhs)=default
image(void *HostPointer, image_channel_order Order, image_channel_type Type, const range< Dimensions > &Range, const typename std::enable_if_t< B, range< Dimensions - 1 >> &Pitch, AllocatorT Allocator, const property_list &PropList={})
bool has_property() const noexcept
friend std::enable_if_t< detail::InteropFeatureSupportMap< Backend >::MakeImage==true &&Backend !=backend::ext_oneapi_level_zero, image< D, A > > make_image(const typename backend_traits< Backend >::template input_type< image< D, A >> &BackendObject, const context &TargetContext, event AvailableEvent)
bool operator==(const image &rhs) const
image & operator=(const image &rhs)=default
propertyT get_property() const
image(image_channel_order Order, image_channel_type Type, const range< Dimensions > &Range, const property_list &PropList={})
Objects of the property_list class are containers for the SYCL properties.
sampled_image_accessor< DataT, Dimensions, AccessTarget > get_access(handler &CommandGroupHandlerRef, const property_list &PropList={}, const detail::code_location CodeLoc=detail::code_location::current())
sampled_image(const sampled_image &rhs)=default
sampled_image(std::shared_ptr< const void > &HostPointer, image_format Format, image_sampler Sampler, const range< Dimensions > &Range, const range< Dimensions - 1 > &Pitch, const property_list &PropList={}, const detail::code_location CodeLoc=detail::code_location::current())
sampled_image(const void *HostPointer, image_format Format, image_sampler Sampler, const range< Dimensions > &Range, const range< Dimensions - 1 > &Pitch, const property_list &PropList={}, const detail::code_location CodeLoc=detail::code_location::current())
host_sampled_image_accessor< DataT, Dimensions > get_host_access(const property_list &PropList={}, const detail::code_location CodeLoc=detail::code_location::current())
bool operator==(const sampled_image &rhs) const
sampled_image(const void *HostPointer, image_format Format, image_sampler Sampler, const range< Dimensions > &Range, const property_list &PropList={}, const detail::code_location CodeLoc=detail::code_location::current())
sampled_image(sampled_image &&rhs)=default
sampled_image(std::shared_ptr< const void > &HostPointer, image_format Format, image_sampler Sampler, const range< Dimensions > &Range, const property_list &PropList={}, const detail::code_location CodeLoc=detail::code_location::current())
sampled_image & operator=(sampled_image &&rhs)=default
size_t byte_size() const noexcept
bool operator!=(const sampled_image &rhs) const
sampled_image & operator=(const sampled_image &rhs)=default
unsampled_image(image_format Format, const range< Dimensions > &Range, const range< Dimensions - 1 > &Pitch, AllocatorT Allocator, const property_list &PropList={}, const detail::code_location CodeLoc=detail::code_location::current())
bool operator==(const unsampled_image &rhs) const
unsampled_image & operator=(unsampled_image &&rhs)=default
unsampled_image(std::shared_ptr< void > &HostPointer, image_format Format, const range< Dimensions > &Range, AllocatorT Allocator, const property_list &PropList={}, const detail::code_location CodeLoc=detail::code_location::current())
unsampled_image & operator=(const unsampled_image &rhs)=default
unsampled_image(const unsampled_image &rhs)=default
unsampled_image_accessor< DataT, Dimensions, AccessMode, AccessTarget > get_access(handler &CommandGroupHandlerRef, const property_list &PropList={}, const detail::code_location CodeLoc=detail::code_location::current())
unsampled_image(void *HostPointer, image_format Format, const range< Dimensions > &Range, const range< Dimensions - 1 > &Pitch, AllocatorT Allocator, const property_list &PropList={}, const detail::code_location CodeLoc=detail::code_location::current())
friend class host_unsampled_image_accessor
unsampled_image(image_format Format, const range< Dimensions > &Range, AllocatorT Allocator, const property_list &PropList={}, const detail::code_location CodeLoc=detail::code_location::current())
unsampled_image(void *HostPointer, image_format Format, const range< Dimensions > &Range, AllocatorT Allocator, const property_list &PropList={}, const detail::code_location CodeLoc=detail::code_location::current())
unsampled_image(void *HostPointer, image_format Format, const range< Dimensions > &Range, const property_list &PropList={}, const detail::code_location CodeLoc=detail::code_location::current())
unsampled_image(void *HostPointer, image_format Format, const range< Dimensions > &Range, const range< Dimensions - 1 > &Pitch, const property_list &PropList={}, const detail::code_location CodeLoc=detail::code_location::current())
unsampled_image(std::shared_ptr< void > &HostPointer, image_format Format, const range< Dimensions > &Range, const range< Dimensions - 1 > &Pitch, const property_list &PropList={}, const detail::code_location CodeLoc=detail::code_location::current())
bool operator!=(const unsampled_image &rhs) const
size_t byte_size() const noexcept
unsampled_image(image_format Format, const range< Dimensions > &Range, const range< Dimensions - 1 > &Pitch, const property_list &PropList={}, const detail::code_location CodeLoc=detail::code_location::current())
unsampled_image(unsampled_image &&rhs)=default
unsampled_image(image_format Format, const range< Dimensions > &Range, const property_list &PropList={}, const detail::code_location CodeLoc=detail::code_location::current())
unsampled_image(std::shared_ptr< void > &HostPointer, image_format Format, const range< Dimensions > &Range, const property_list &PropList={}, const detail::code_location CodeLoc=detail::code_location::current())
host_unsampled_image_accessor< DataT, Dimensions, AccessMode > get_host_access(const property_list &PropList={}, const detail::code_location CodeLoc=detail::code_location::current())
unsampled_image(std::shared_ptr< void > &HostPointer, image_format Format, const range< Dimensions > &Range, const range< Dimensions - 1 > &Pitch, AllocatorT Allocator, const property_list &PropList={}, const detail::code_location CodeLoc=detail::code_location::current())
Provides a cross-patform vector class template that works efficiently on SYCL devices as well as in h...
static T< NewDim > convertToArrayOfN(T< OldDim > OldObj)
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)
std::array< size_t, 3 > rangeToArray(const range< 3 > &r)
boost::mp11::mp_set_contains< TypeList, std::remove_cv_t< T > > is_contained
image_channel_type FormatChannelType(image_format Format)
decltype(Obj::impl) getSyclObjImpl(const Obj &SyclObject)
boost::mp11::mp_list< T... > type_list
T createSyclObjFromImpl(decltype(T::impl) ImplObj)
typename detail::is_contained< T, type_list< vec< opencl::cl_int, 4 >, vec< opencl::cl_uint, 4 >, vec< opencl::cl_float, 4 >, vec< opencl::cl_half, 4 > >>::type is_validImageDataT
image_channel_order FormatChannelOrder(image_format Format)
void sampledImageConstructorNotification(void *ImageObj, void *AccessorObj, const std::optional< image_target > &Target, const void *Type, uint32_t ElemSize, const code_location &CodeLoc)
typename std::enable_if_t< is_validImageDataT< DataT >::value, DataT > EnableIfImgAccDataT
static constexpr auto get_property()
class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(local_accessor) local_accessor class __SYCL_EBO __SYCL_SPECIAL_CLASS Dimensions
constexpr mode_tag_t< access_mode::read_write > read_write
std::enable_if_t< detail::InteropFeatureSupportMap< Backend >::MakeImage==true &&Backend !=backend::ext_oneapi_level_zero, image< Dimensions, AllocatorT > > make_image(const typename backend_traits< Backend >::template input_type< image< Dimensions, AllocatorT >> &BackendObject, const context &TargetContext, event AvailableEvent={})
class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(local_accessor) local_accessor class __SYCL_EBO __SYCL_SPECIAL_CLASS IsPlaceholder
class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(local_accessor) local_accessor class __SYCL_EBO __SYCL_SPECIAL_CLASS AccessMode
detail::aligned_allocator< byte > image_allocator
std::error_code make_error_code(sycl::errc E) noexcept
Constructs an error code using e and sycl_category()
typename backend_traits< Backend >::template input_type< SyclType > backend_input_t
static constexpr size_t get_pitch(size_t x)
Calculate pitch (padded length of major dimension x) by rounding up to multiple of 32.
uintptr_t pi_native_handle
_Abi const simd< _Tp, _Abi > & noexcept
size_t operator()(const sycl::image< Dimensions, AllocatorT > &I) const
size_t operator()(const sycl::sampled_image< Dimensions, AllocatorT > &I) const
size_t operator()(const sycl::unsampled_image< Dimensions, AllocatorT > &I) const
static constexpr bool MakeImage
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