DPC++ Runtime
Runtime libraries for oneAPI DPC++
sycl::_V1::detail::image_impl Class Referencefinal

#include <detail/image_impl.hpp>

Inheritance diagram for sycl::_V1::detail::image_impl:
Collaboration diagram for sycl::_V1::detail::image_impl:

Public Member Functions

 image_impl (image_channel_order Order, image_channel_type Type, const range< 3 > &ImageRange, std::unique_ptr< SYCLMemObjAllocator > Allocator, uint8_t Dimensions, const property_list &PropList={})
 
 image_impl (image_channel_order Order, image_channel_type Type, const range< 3 > &ImageRange, const range< 2 > &Pitch, std::unique_ptr< SYCLMemObjAllocator > Allocator, uint8_t Dimensions, const property_list &PropList={})
 
 image_impl (void *HData, image_channel_order Order, image_channel_type Type, const range< 3 > &ImageRange, std::unique_ptr< SYCLMemObjAllocator > Allocator, uint8_t Dimensions, const property_list &PropList={})
 
 image_impl (const void *HData, image_channel_order Order, image_channel_type Type, const range< 3 > &ImageRange, std::unique_ptr< SYCLMemObjAllocator > Allocator, uint8_t Dimensions, const property_list &PropList={})
 
 image_impl (void *HData, image_channel_order Order, image_channel_type Type, const range< 3 > &ImageRange, const range< 2 > &Pitch, std::unique_ptr< SYCLMemObjAllocator > Allocator, uint8_t Dimensions, const property_list &PropList={})
 
 image_impl (const std::shared_ptr< const void > &HData, image_channel_order Order, image_channel_type Type, const range< 3 > &ImageRange, std::unique_ptr< SYCLMemObjAllocator > Allocator, uint8_t Dimensions, const property_list &PropList, bool IsConstPtr)
 
 image_impl (const std::shared_ptr< const void > &HData, image_channel_order Order, image_channel_type Type, const range< 3 > &ImageRange, const range< 2 > &Pitch, std::unique_ptr< SYCLMemObjAllocator > Allocator, uint8_t Dimensions, const property_list &PropList, bool IsConstPtr)
 
 image_impl (const void *HData, image_channel_order Order, image_channel_type Type, image_sampler Sampler, const range< 3 > &ImageRange, std::unique_ptr< SYCLMemObjAllocator > Allocator, uint8_t Dimensions, const property_list &PropList={})
 
 image_impl (const void *HData, image_channel_order Order, image_channel_type Type, image_sampler Sampler, const range< 3 > &ImageRange, const range< 2 > &Pitch, std::unique_ptr< SYCLMemObjAllocator > Allocator, uint8_t Dimensions, const property_list &PropList={})
 
 image_impl (const std::shared_ptr< const void > &HData, image_channel_order Order, image_channel_type Type, image_sampler Sampler, const range< 3 > &ImageRange, std::unique_ptr< SYCLMemObjAllocator > Allocator, uint8_t Dimensions, const property_list &PropList)
 
 image_impl (const std::shared_ptr< const void > &HData, image_channel_order Order, image_channel_type Type, image_sampler Sampler, const range< 3 > &ImageRange, const range< 2 > &Pitch, std::unique_ptr< SYCLMemObjAllocator > Allocator, uint8_t Dimensions, const property_list &PropList)
 
 image_impl (cl_mem MemObject, const context &SyclContext, event AvailableEvent, std::unique_ptr< SYCLMemObjAllocator > Allocator, uint8_t Dimensions)
 
 image_impl (pi_native_handle MemObject, const context &SyclContext, event AvailableEvent, std::unique_ptr< SYCLMemObjAllocator > Allocator, uint8_t Dimensions, image_channel_order Order, image_channel_type Type, bool OwnNativeHandle, range< 3 > Range3WithOnes)
 
range< 3 > get_range () const
 
range< 2 > get_pitch () const
 
size_t get_count () const
 
size_t size () const noexcept
 
void * allocateMem (ContextImplPtr Context, bool InitFromUserData, void *HostPtr, sycl::detail::pi::PiEvent &OutEventToWait) override
 
MemObjType getType () const override
 
size_t getElementSize () const
 
image_channel_order getChannelOrder () const
 
image_channel_type getChannelType () const
 
size_t getRowPitch () const
 
size_t getSlicePitch () const
 
image_sampler getSampler () const noexcept
 
 ~image_impl ()
 
void sampledImageConstructorNotification (const detail::code_location &CodeLoc, void *UserObj, const void *HostObj, uint32_t Dim, size_t Range[3], image_format Format, const image_sampler &Sampler)
 
void sampledImageDestructorNotification (void *UserObj)
 
void unsampledImageConstructorNotification (const detail::code_location &CodeLoc, void *UserObj, const void *HostObj, uint32_t Dim, size_t Range[3], image_format Format)
 
void unsampledImageDestructorNotification (void *UserObj)
 
- Public Member Functions inherited from sycl::_V1::detail::SYCLMemObjT
 SYCLMemObjT (const size_t SizeInBytes, const property_list &Props, std::unique_ptr< SYCLMemObjAllocator > Allocator)
 
 SYCLMemObjT (const property_list &Props, std::unique_ptr< SYCLMemObjAllocator > Allocator)
 
 SYCLMemObjT (pi_native_handle MemObject, const context &SyclContext, const size_t SizeInBytes, event AvailableEvent, std::unique_ptr< SYCLMemObjAllocator > Allocator)
 
 SYCLMemObjT (cl_mem MemObject, const context &SyclContext, event AvailableEvent, std::unique_ptr< SYCLMemObjAllocator > Allocator)
 
 SYCLMemObjT (pi_native_handle MemObject, const context &SyclContext, bool OwnNativeHandle, event AvailableEvent, std::unique_ptr< SYCLMemObjAllocator > Allocator)
 
 SYCLMemObjT (pi_native_handle MemObject, const context &SyclContext, bool OwnNativeHandle, event AvailableEvent, std::unique_ptr< SYCLMemObjAllocator > Allocator, sycl::detail::pi::PiMemImageChannelOrder Order, sycl::detail::pi::PiMemImageChannelType Type, range< 3 > Range3WithOnes, unsigned Dimensions, size_t ElementSize)
 
virtual ~SYCLMemObjT ()=default
 
const PluginPtrgetPlugin () const
 
size_t getSizeInBytes () const noexcept override
 
 __SYCL2020_DEPRECATED ("get_count() is deprecated, please use size() instead") size_t get_count() const
 
size_t size () const noexcept
 
template<typename propertyT >
bool has_property () const noexcept
 
template<typename propertyT >
propertyT get_property () const
 
void addOrReplaceAccessorProperties (const property_list &PropertyList)
 
void deleteAccessorProperty (const PropWithDataKind &Kind)
 
const std::unique_ptr< SYCLMemObjAllocator > & get_allocator_internal () const
 
void * allocateHostMem () override
 
void releaseHostMem (void *Ptr) override
 
void releaseMem (ContextImplPtr Context, void *MemAllocation) override
 
void * getUserPtr () const
 
void set_write_back (bool NeedWriteBack)
 
void set_final_data (std::nullptr_t)
 
void set_final_data_from_storage ()
 
void set_final_data (const std::function< void(const std::function< void(void *const Ptr)> &)> &FinalDataFunc)
 
bool useHostPtr ()
 
bool canReadHostPtr (void *HostPtr, const size_t RequiredAlign)
 
bool canReuseHostPtr (void *HostPtr, const size_t RequiredAlign)
 
void handleHostData (void *HostPtr, const size_t RequiredAlign)
 
void handleHostData (const void *HostPtr, const size_t RequiredAlign)
 
void handleHostData (const std::shared_ptr< void > &HostPtr, const size_t RequiredAlign, bool IsConstPtr)
 
void handleHostData (const std::function< void(void *)> &CopyFromInput, const size_t RequiredAlign, bool IsConstPtr)
 
void setAlign (size_t RequiredAlign)
 
void handleWriteAccessorCreation ()
 
void * allocateMem (ContextImplPtr Context, bool InitFromUserData, void *HostPtr, sycl::detail::pi::PiEvent &InteropEvent) override
 
MemObjType getType () const override
 
ContextImplPtr getInteropContext () const override
 
bool isInterop () const override
 
bool hasUserDataPtr () const override
 
bool isHostPointerReadOnly () const override
 
bool usesPinnedHostMemory () const override
 
void detachMemoryObject (const std::shared_ptr< SYCLMemObjT > &Self) const
 
void markAsInternal ()
 
bool needsWriteBack () const
 Returns true if this memory object requires a write_back on destruction. More...
 
void markBeingUsedInGraph ()
 Increment an internal counter for how many graphs are currently using this memory object. More...
 
void markNoLongerBeingUsedInGraph ()
 Decrement an internal counter for how many graphs are currently using this memory object. More...
 
bool isUsedInGraph () const
 Returns true if any graphs are currently using this memory object. More...
 
- Public Member Functions inherited from sycl::_V1::detail::SYCLMemObjI
virtual ~SYCLMemObjI ()=default
 

Additional Inherited Members

- Public Types inherited from sycl::_V1::detail::SYCLMemObjI
enum  MemObjType { Buffer = 0 , Image = 1 , Undefined = 2 }
 
- Static Public Member Functions inherited from sycl::_V1::detail::SYCLMemObjT
static size_t getBufSizeForContext (const ContextImplPtr &Context, pi_native_handle MemObject)
 
- Protected Member Functions inherited from sycl::_V1::detail::SYCLMemObjT
void updateHostMemory (void *const Ptr)
 
void updateHostMemory ()
 
void determineHostPtr (const ContextImplPtr &Context, bool InitFromUserData, void *&HostPtr, bool &HostPtrReadOnly)
 
- Protected Attributes inherited from sycl::_V1::detail::SYCLMemObjT
std::unique_ptr< SYCLMemObjAllocatorMAllocator
 
property_list MProps
 
EventImplPtr MInteropEvent
 
ContextImplPtr MInteropContext
 
sycl::detail::pi::PiMem MInteropMemObject
 
bool MOpenCLInterop
 
bool MHostPtrReadOnly
 
bool MNeedWriteBack
 
size_t MSizeInBytes
 
void * MUserPtr
 
void * MShadowCopy
 
std::function< void(void)> MUploadDataFunctor
 
std::shared_ptr< const void > MSharedPtrStorage
 
bool MHostPtrProvided
 
bool MIsInternal = false
 
std::atomic< size_t > MGraphUseCount = 0
 
std::function< void(void)> MCreateShadowCopy = []() -> void {}
 
bool MOwnNativeHandle = true
 
- Protected Attributes inherited from sycl::_V1::detail::SYCLMemObjI
std::shared_ptr< MemObjRecordMRecord
 

Detailed Description

Definition at line 61 of file image_impl.hpp.

Constructor & Destructor Documentation

◆ image_impl() [1/13]

sycl::_V1::detail::image_impl::image_impl ( image_channel_order  Order,
image_channel_type  Type,
const range< 3 > &  ImageRange,
std::unique_ptr< SYCLMemObjAllocator Allocator,
uint8_t  Dimensions,
const property_list PropList = {} 
)
inline

Definition at line 88 of file image_impl.hpp.

◆ image_impl() [2/13]

sycl::_V1::detail::image_impl::image_impl ( image_channel_order  Order,
image_channel_type  Type,
const range< 3 > &  ImageRange,
const range< 2 > &  Pitch,
std::unique_ptr< SYCLMemObjAllocator Allocator,
uint8_t  Dimensions,
const property_list PropList = {} 
)
inline

Definition at line 95 of file image_impl.hpp.

◆ image_impl() [3/13]

sycl::_V1::detail::image_impl::image_impl ( void *  HData,
image_channel_order  Order,
image_channel_type  Type,
const range< 3 > &  ImageRange,
std::unique_ptr< SYCLMemObjAllocator Allocator,
uint8_t  Dimensions,
const property_list PropList = {} 
)
inline

Definition at line 102 of file image_impl.hpp.

◆ image_impl() [4/13]

sycl::_V1::detail::image_impl::image_impl ( const void *  HData,
image_channel_order  Order,
image_channel_type  Type,
const range< 3 > &  ImageRange,
std::unique_ptr< SYCLMemObjAllocator Allocator,
uint8_t  Dimensions,
const property_list PropList = {} 
)
inline

Definition at line 114 of file image_impl.hpp.

◆ image_impl() [5/13]

sycl::_V1::detail::image_impl::image_impl ( void *  HData,
image_channel_order  Order,
image_channel_type  Type,
const range< 3 > &  ImageRange,
const range< 2 > &  Pitch,
std::unique_ptr< SYCLMemObjAllocator Allocator,
uint8_t  Dimensions,
const property_list PropList = {} 
)
inline

Definition at line 126 of file image_impl.hpp.

◆ image_impl() [6/13]

sycl::_V1::detail::image_impl::image_impl ( const std::shared_ptr< const void > &  HData,
image_channel_order  Order,
image_channel_type  Type,
const range< 3 > &  ImageRange,
std::unique_ptr< SYCLMemObjAllocator Allocator,
uint8_t  Dimensions,
const property_list PropList,
bool  IsConstPtr 
)
inline

Definition at line 138 of file image_impl.hpp.

References sycl::_V1::detail::getNextPowerOfTwo().

◆ image_impl() [7/13]

sycl::_V1::detail::image_impl::image_impl ( const std::shared_ptr< const void > &  HData,
image_channel_order  Order,
image_channel_type  Type,
const range< 3 > &  ImageRange,
const range< 2 > &  Pitch,
std::unique_ptr< SYCLMemObjAllocator Allocator,
uint8_t  Dimensions,
const property_list PropList,
bool  IsConstPtr 
)
inline

Definition at line 152 of file image_impl.hpp.

References sycl::_V1::detail::getNextPowerOfTwo().

◆ image_impl() [8/13]

sycl::_V1::detail::image_impl::image_impl ( const void *  HData,
image_channel_order  Order,
image_channel_type  Type,
image_sampler  Sampler,
const range< 3 > &  ImageRange,
std::unique_ptr< SYCLMemObjAllocator Allocator,
uint8_t  Dimensions,
const property_list PropList = {} 
)
inline

Definition at line 166 of file image_impl.hpp.

◆ image_impl() [9/13]

sycl::_V1::detail::image_impl::image_impl ( const void *  HData,
image_channel_order  Order,
image_channel_type  Type,
image_sampler  Sampler,
const range< 3 > &  ImageRange,
const range< 2 > &  Pitch,
std::unique_ptr< SYCLMemObjAllocator Allocator,
uint8_t  Dimensions,
const property_list PropList = {} 
)
inline

Definition at line 180 of file image_impl.hpp.

◆ image_impl() [10/13]

sycl::_V1::detail::image_impl::image_impl ( const std::shared_ptr< const void > &  HData,
image_channel_order  Order,
image_channel_type  Type,
image_sampler  Sampler,
const range< 3 > &  ImageRange,
std::unique_ptr< SYCLMemObjAllocator Allocator,
uint8_t  Dimensions,
const property_list PropList 
)
inline

Definition at line 194 of file image_impl.hpp.

References sycl::_V1::detail::getNextPowerOfTwo().

◆ image_impl() [11/13]

sycl::_V1::detail::image_impl::image_impl ( const std::shared_ptr< const void > &  HData,
image_channel_order  Order,
image_channel_type  Type,
image_sampler  Sampler,
const range< 3 > &  ImageRange,
const range< 2 > &  Pitch,
std::unique_ptr< SYCLMemObjAllocator Allocator,
uint8_t  Dimensions,
const property_list PropList 
)
inline

Definition at line 210 of file image_impl.hpp.

References sycl::_V1::detail::getNextPowerOfTwo().

◆ image_impl() [12/13]

sycl::_V1::detail::image_impl::image_impl ( cl_mem  MemObject,
const context SyclContext,
event  AvailableEvent,
std::unique_ptr< SYCLMemObjAllocator Allocator,
uint8_t  Dimensions 
)

Definition at line 273 of file image_impl.cpp.

◆ image_impl() [13/13]

sycl::_V1::detail::image_impl::image_impl ( pi_native_handle  MemObject,
const context SyclContext,
event  AvailableEvent,
std::unique_ptr< SYCLMemObjAllocator Allocator,
uint8_t  Dimensions,
image_channel_order  Order,
image_channel_type  Type,
bool  OwnNativeHandle,
range< 3 >  Range3WithOnes 
)

◆ ~image_impl()

sycl::_V1::detail::image_impl::~image_impl ( )
inline

Definition at line 273 of file image_impl.hpp.

Member Function Documentation

◆ allocateMem()

◆ get_count()

size_t sycl::_V1::detail::image_impl::get_count ( ) const
inline

Definition at line 245 of file image_impl.hpp.

◆ get_pitch()

range<2> sycl::_V1::detail::image_impl::get_pitch ( ) const
inline

Definition at line 242 of file image_impl.hpp.

◆ get_range()

range<3> sycl::_V1::detail::image_impl::get_range ( ) const
inline

Definition at line 239 of file image_impl.hpp.

◆ getChannelOrder()

image_channel_order sycl::_V1::detail::image_impl::getChannelOrder ( ) const
inline

Definition at line 259 of file image_impl.hpp.

◆ getChannelType()

image_channel_type sycl::_V1::detail::image_impl::getChannelType ( ) const
inline

Definition at line 261 of file image_impl.hpp.

◆ getElementSize()

size_t sycl::_V1::detail::image_impl::getElementSize ( ) const
inline

Definition at line 257 of file image_impl.hpp.

◆ getRowPitch()

size_t sycl::_V1::detail::image_impl::getRowPitch ( ) const
inline

Definition at line 263 of file image_impl.hpp.

◆ getSampler()

image_sampler sycl::_V1::detail::image_impl::getSampler ( ) const
inlinenoexcept

Definition at line 267 of file image_impl.hpp.

References sycl::_V1::linear, sycl::_V1::none, and sycl::_V1::unnormalized.

◆ getSlicePitch()

size_t sycl::_V1::detail::image_impl::getSlicePitch ( ) const
inline

Definition at line 265 of file image_impl.hpp.

◆ getType()

MemObjType sycl::_V1::detail::image_impl::getType ( ) const
inlineoverridevirtual

Implements sycl::_V1::detail::SYCLMemObjI.

Definition at line 252 of file image_impl.hpp.

◆ sampledImageConstructorNotification()

void sycl::_V1::detail::image_impl::sampledImageConstructorNotification ( const detail::code_location CodeLoc,
void *  UserObj,
const void *  HostObj,
uint32_t  Dim,
size_t  Range[3],
image_format  Format,
const image_sampler Sampler 
)

◆ sampledImageDestructorNotification()

void sycl::_V1::detail::image_impl::sampledImageDestructorNotification ( void *  UserObj)

◆ size()

size_t sycl::_V1::detail::image_impl::size ( ) const
inlinenoexcept

Definition at line 246 of file image_impl.hpp.

◆ unsampledImageConstructorNotification()

void sycl::_V1::detail::image_impl::unsampledImageConstructorNotification ( const detail::code_location CodeLoc,
void *  UserObj,
const void *  HostObj,
uint32_t  Dim,
size_t  Range[3],
image_format  Format 
)

◆ unsampledImageDestructorNotification()

void sycl::_V1::detail::image_impl::unsampledImageDestructorNotification ( void *  UserObj)

The documentation for this class was generated from the following files: