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,
258 return getPropList().template has_property<propertyT>();
262 return getPropList().template get_property<propertyT>();
273 void set_final_data_internal();
275 void set_final_data_internal(
276 const
std::function<
void(const
std::function<
void(
void *const Ptr)> &)>
279 void set_write_back(
bool flag);
283 size_t getElementSize() const;
285 size_t getRowPitch() const;
287 size_t getSlicePitch() const;
296 void *UserObj, const
void *HostObj,
297 uint32_t Dim,
size_t Range[3],
300 void sampledImageDestructorNotification(
void *UserObj);
303 const detail::
code_location &CodeLoc,
void *UserObj, const
void *HostObj,
305 void unsampledImageDestructorNotification(
void *UserObj);
313 template <
int Dimensions, typename AllocatorT>
322 return image_plain::template has_property<propertyT>();
326 return image_plain::get_property<propertyT>();
334 template <
bool IsMultiDim = (Dimensions > 1)>
346 ->template getAllocator<AllocatorT>();
351 template <
int Dimensions,
typename AllocatorT>
358 using common_base::image_common;
361 template <
typename Destination = std::
nullptr_t>
363 this->set_final_data_internal(finalData);
369 void set_final_data_internal(std::nullptr_t) {
370 common_base::set_final_data_internal();
373 template <
template <
typename WeakT>
class WeakPtrT,
typename WeakT>
375 std::is_convertible<WeakPtrT<WeakT>, std::weak_ptr<WeakT>>::value>
376 set_final_data_internal(WeakPtrT<WeakT> FinalData) {
377 std::weak_ptr<WeakT> TempFinalData(FinalData);
378 this->set_final_data_internal(TempFinalData);
381 template <
typename WeakT>
382 void set_final_data_internal(std::weak_ptr<WeakT> FinalData) {
383 common_base::set_final_data_internal(
384 [FinalData](
const std::function<
void(
void *
const Ptr)> &F) {
385 if (std::shared_ptr<WeakT> LockedFinalData = FinalData.lock())
386 F(LockedFinalData.get());
390 template <
typename Destination>
391 detail::EnableIfOutputPointerT<Destination>
392 set_final_data_internal(Destination FinalData) {
394 common_base::set_final_data_internal();
396 common_base::set_final_data_internal(
397 [FinalData](
const std::function<
void(
void *
const Ptr)> &F) {
402 template <
typename Destination>
403 detail::EnableIfOutputIteratorT<Destination>
404 set_final_data_internal(Destination FinalData) {
405 const size_t Size = common_base::size();
406 common_base::set_final_data_internal(
407 [FinalData, Size](
const std::function<
void(
void *
const Ptr)> &F) {
408 using DestinationValueT = detail::iterator_value_type_t<Destination>;
412 std::unique_ptr<DestinationValueT[]> ContiguousStorage(
413 new DestinationValueT[Size]);
414 F(ContiguousStorage.get());
415 std::copy(ContiguousStorage.get(), ContiguousStorage.get() + Size,
421 template <
typename DataT,
int Dims,
access::mode AccMode,
423 class image_accessor;
429 class unsampled_image_accessor;
431 template <
typename DataT,
int Dimensions, access_mode AccessMode>
432 class host_unsampled_image_accessor;
434 template <
typename DataT,
int Dimensions, image_target AccessTarget>
435 class sampled_image_accessor;
437 template <
typename DataT,
int Dimensions>
class host_sampled_image_accessor;
448 template <
int Dimensions = 1,
typename AllocatorT = sycl::image_allocator>
457 : common_base(Order, Type, detail::convertToArrayOfN<3, 1>(Range),
466 Order, Type, detail::convertToArrayOfN<3, 1>(Range),
472 template <
bool B = (Dimensions > 1)>
477 : common_base(Order, Type, detail::convertToArrayOfN<3, 1>(Range),
478 detail::convertToArrayOfN<2, 0>(Pitch),
484 template <
bool B = (Dimensions > 1)>
490 Order, Type, detail::convertToArrayOfN<3, 1>(Range),
491 detail::convertToArrayOfN<2, 0>(Pitch),
498 : common_base(HostPointer, Order, Type,
499 detail::convertToArrayOfN<3, 1>(Range),
508 HostPointer, Order, Type, detail::convertToArrayOfN<3, 1>(Range),
516 : common_base(HostPointer, Order, Type,
517 detail::convertToArrayOfN<3, 1>(Range),
526 HostPointer, Order, Type, detail::convertToArrayOfN<3, 1>(Range),
532 template <
bool B = (Dimensions > 1)>
537 : common_base(HostPointer, Order, Type,
538 detail::convertToArrayOfN<3, 1>(Range),
539 detail::convertToArrayOfN<2, 0>(Pitch),
545 template <
bool B = (Dimensions > 1)>
551 HostPointer, Order, Type, detail::convertToArrayOfN<3, 1>(Range),
552 detail::convertToArrayOfN<2, 0>(Pitch),
560 : common_base(HostPointer, Order, Type,
561 detail::convertToArrayOfN<3, 1>(Range),
570 HostPointer, Order, Type, detail::convertToArrayOfN<3, 1>(Range),
576 template <
bool B = (Dimensions > 1)>
581 : common_base(HostPointer, Order, Type,
582 detail::convertToArrayOfN<3, 1>(Range),
583 detail::convertToArrayOfN<2, 0>(Pitch),
589 template <
bool B = (Dimensions > 1)>
595 HostPointer, Order, Type, detail::convertToArrayOfN<3, 1>(Range),
596 detail::convertToArrayOfN<2, 0>(Pitch),
601 #ifdef __SYCL_INTERNAL_API
603 event AvailableEvent = {})
604 : common_base(ClMemObject, SyclContext, AvailableEvent,
606 detail::SYCLMemObjAllocatorHolder<AllocatorT, byte>>(),
628 return common_base::template has_property<propertyT>();
632 return common_base::template get_property<propertyT>();
636 return detail::convertToArrayOfN<Dimensions, 0>(common_base::get_range());
640 template <
bool B = (Dimensions > 1)>
647 size_t get_size()
const {
return common_base::get_size(); }
651 size_t get_count()
const {
return common_base::size(); }
653 template <
typename DataT, access::mode AccessMode>
661 commandGroupHandler);
664 template <
typename DataT, access::mode AccessMode>
675 image(ur_native_handle_t MemObject,
const context &SyclContext,
678 : common_base(MemObject, SyclContext, AvailableEvent,
680 detail::SYCLMemObjAllocatorHolder<AllocatorT,
byte>>(),
687 size_t getElementSize()
const {
return common_base::getElementSize(); }
689 size_t getRowPitch()
const {
return common_base::getRowPitch(); }
691 size_t getSlicePitch()
const {
return common_base::getSlicePitch(); }
694 return common_base::getChannelOrder();
698 return common_base::getChannelType();
702 template <backend Backend,
int D,
typename A>
703 friend std::enable_if_t<
712 template <backend Backend,
int D,
typename A>
719 friend const decltype(Obj::impl) &
722 template <
typename DataT,
int Dims,
access::mode AccMode,
724 typename PropertyListT>
727 template <
typename DataT,
int Dims,
access::mode AccMode,
732 template <
int Dimensions = 1,
typename AllocatorT = sycl::image_allocator>
741 : common_base{Impl} {}
750 detail::convertToArrayOfN<3, 1>(Range),
755 CodeLoc, (
void *)this->impl.get(),
nullptr,
Dimensions,
766 detail::convertToArrayOfN<3, 1>(Range),
771 CodeLoc, (
void *)this->impl.get(),
nullptr,
Dimensions,
775 template <
bool IsMultiDim = (Dimensions > 1),
776 typename = std::enable_if_t<IsMultiDim>>
783 detail::convertToArrayOfN<3, 1>(Range),
784 detail::convertToArrayOfN<2, 0>(Pitch),
789 CodeLoc, (
void *)this->impl.get(),
nullptr,
Dimensions,
793 template <
bool IsMultiDim = (Dimensions > 1),
794 typename = std::enable_if_t<IsMultiDim>>
803 detail::convertToArrayOfN<3, 1>(Range),
804 detail::convertToArrayOfN<2, 0>(Pitch),
809 CodeLoc, (
void *)this->impl.get(),
nullptr,
Dimensions,
819 detail::convertToArrayOfN<3, 1>(Range),
824 CodeLoc, (
void *)this->impl.get(), HostPointer,
Dimensions,
835 detail::convertToArrayOfN<3, 1>(Range),
840 CodeLoc, (
void *)this->impl.get(), HostPointer,
Dimensions,
844 template <
bool IsMultiDim = (Dimensions > 1),
845 typename = std::enable_if_t<IsMultiDim>>
852 detail::convertToArrayOfN<3, 1>(Range),
853 detail::convertToArrayOfN<2, 0>(Pitch),
858 CodeLoc, (
void *)this->impl.get(), HostPointer,
Dimensions,
862 template <
bool IsMultiDim = (Dimensions > 1),
863 typename = std::enable_if_t<IsMultiDim>>
872 detail::convertToArrayOfN<3, 1>(Range),
873 detail::convertToArrayOfN<2, 0>(Pitch),
878 CodeLoc, (
void *)this->impl.get(), HostPointer,
Dimensions,
883 std::shared_ptr<void> &HostPointer,
image_format Format,
888 detail::convertToArrayOfN<3, 1>(Range),
893 CodeLoc, (
void *)this->impl.get(), HostPointer.get(),
Dimensions,
898 std::shared_ptr<void> &HostPointer,
image_format Format,
905 detail::convertToArrayOfN<3, 1>(Range),
910 CodeLoc, (
void *)this->impl.get(), HostPointer.get(),
Dimensions,
914 template <
bool IsMultiDim = (Dimensions > 1),
915 typename = std::enable_if_t<IsMultiDim>>
917 std::shared_ptr<void> &HostPointer,
image_format Format,
923 detail::convertToArrayOfN<3, 1>(Range),
924 detail::convertToArrayOfN<2, 0>(Pitch),
929 CodeLoc, (
void *)this->impl.get(), HostPointer.get(),
Dimensions,
933 template <
bool IsMultiDim = (Dimensions > 1),
934 typename = std::enable_if_t<IsMultiDim>>
936 std::shared_ptr<void> &HostPointer,
image_format Format,
943 detail::convertToArrayOfN<3, 1>(Range),
944 detail::convertToArrayOfN<2, 0>(Pitch),
949 CodeLoc, (
void *)this->impl.get(), HostPointer.get(),
Dimensions,
965 common_base::unsampledImageDestructorNotification(
966 (
void *)this->impl.get());
967 }
catch (std::exception &e) {
973 return this->impl == rhs.
impl;
980 using common_base::size;
982 template <
typename DataT,
991 return {*
this, CommandGroupHandlerRef, PropList, CodeLoc};
994 template <
typename DataT,
1001 return {*
this, PropList, CodeLoc};
1005 template <
class Obj>
1006 friend const decltype(Obj::impl) &
1012 template <
typename DataT,
int Dims, access_mode AccessMode>
1020 template <
int Dimensions = 1,
typename AllocatorT = sycl::image_allocator>
1027 sampled_image(
const std::shared_ptr<detail::image_impl> &Impl)
1028 : common_base{Impl} {}
1037 detail::convertToArrayOfN<3, 1>(Range),
1042 CodeLoc, (
void *)this->impl.get(),
nullptr,
Dimensions,
1046 template <
bool IsMultiDim = (Dimensions > 1),
1047 typename = std::enable_if_t<IsMultiDim>>
1055 detail::convertToArrayOfN<3, 1>(Range),
1056 detail::convertToArrayOfN<2, 0>(Pitch),
1061 CodeLoc, (
void *)this->impl.get(), HostPointer,
Dimensions,
1066 std::shared_ptr<const void> &HostPointer,
image_format Format,
1072 detail::convertToArrayOfN<3, 1>(Range),
1077 CodeLoc, (
void *)this->impl.get(), HostPointer.get(),
Dimensions,
1081 template <
bool IsMultiDim = (Dimensions > 1),
1082 typename = std::enable_if_t<IsMultiDim>>
1084 std::shared_ptr<const void> &HostPointer,
image_format Format,
1090 detail::convertToArrayOfN<3, 1>(Range),
1091 detail::convertToArrayOfN<2, 0>(Pitch),
1096 CodeLoc, (
void *)this->impl.get(), HostPointer.get(),
Dimensions,
1112 common_base::sampledImageDestructorNotification((
void *)this->impl.get());
1113 }
catch (std::exception &e) {
1119 return this->impl == rhs.
impl;
1126 template <
typename DataT, image_target AccessTarget = image_target::device>
1130 return {*
this, CommandGroupHandlerRef, PropList, CodeLoc};
1133 template <
typename DataT>
1137 return {*
this, PropList, CodeLoc};
1141 template <
class Obj>
1142 friend const decltype(Obj::impl) &
1150 template <
typename DataT,
int Dims, image_target AccessTarget>
1158 template <
int Dimensions,
typename AllocatorT>
1159 struct hash<
sycl::image<Dimensions, AllocatorT>> {
1161 return hash<std::shared_ptr<sycl::detail::image_impl>>()(
1166 template <
int Dimensions,
typename AllocatorT>
1167 struct hash<
sycl::unsampled_image<Dimensions, AllocatorT>> {
1170 return hash<std::shared_ptr<sycl::detail::image_impl>>()(
1175 template <
int Dimensions,
typename AllocatorT>
1176 struct hash<
sycl::sampled_image<Dimensions, AllocatorT>> {
1179 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
propertyT get_property() 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())
#define __SYCL_REPORT_EXCEPTION_TO_STREAM(str, e)
static T< NewDim > convertToArrayOfN(T< OldDim > OldObj)
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)
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)
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
void copy(handler &CGH, const T *Src, T *Dest, size_t Count)
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 IsPlaceholder
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.
_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