DPC++ Runtime
Runtime libraries for oneAPI DPC++
_pi_image Struct Referencefinal

#include <esimd_emulator/pi_esimd_emulator.hpp>

Inheritance diagram for _pi_image:
Collaboration diagram for _pi_image:

Public Member Functions

 _pi_image (pi_context ctxt, char *HostPtr, cm_surface_ptr_t SurfacePtrArg, unsigned int SurfaceIdxArg, size_t WidthArg, size_t HeightArg, size_t BPPArg)
 
 _pi_image (pi_context Ctx, ze_image_handle_t Image)
 
virtual pi_result getZeHandle (char *&ZeHandle, access_mode_t, pi_device=nullptr) override
 
virtual pi_result getZeHandlePtr (char **&ZeHandlePtr, access_mode_t, pi_device=nullptr) override
 
bool isImage () const override
 
- Public Member Functions inherited from _pi_mem
 _pi_mem (pi_context ctxt, pi_mem parent, mem_::buffer_mem_::alloc_mode mode, CUdeviceptr ptr, void *host_ptr, size_t size)
 Constructs the PI MEM handler for a non-typed allocation ("buffer") More...
 
 _pi_mem (pi_context ctxt, CUarray array, CUsurfObject surf, pi_mem_type image_type, void *host_ptr)
 Constructs the PI allocation for an Image object (surface in CUDA) More...
 
 ~_pi_mem ()
 
bool is_buffer () const noexcept
 
bool is_sub_buffer () const noexcept
 
bool is_image () const noexcept
 
pi_context get_context () const noexcept
 
pi_uint32 increment_reference_count () noexcept
 
pi_uint32 decrement_reference_count () noexcept
 
pi_uint32 get_reference_count () const noexcept
 
 ~_pi_mem ()
 
 _pi_mem (pi_context ctxt, pi_mem parent, mem_::buffer_mem_::alloc_mode mode, hipDeviceptr_t ptr, void *host_ptr, size_t size)
 Constructs the PI MEM handler for a non-typed allocation ("buffer") More...
 
 _pi_mem (pi_context ctxt, hipArray *array, hipSurfaceObject_t surf, pi_mem_type image_type, void *host_ptr)
 Constructs the PI allocation for an Image object. More...
 
 ~_pi_mem ()
 
bool is_buffer () const noexcept
 
bool is_sub_buffer () const noexcept
 
bool is_image () const noexcept
 
pi_context get_context () const noexcept
 
pi_uint32 increment_reference_count () noexcept
 
pi_uint32 decrement_reference_count () noexcept
 
pi_uint32 get_reference_count () const noexcept
 
virtual ~_pi_mem ()=default
 

Public Attributes

size_t Width
 
size_t Height
 
size_t BytesPerPixel
 
ZeStruct< ze_image_desc_t > ZeImageDesc
 
ze_image_handle_t ZeImage
 
- Public Attributes inherited from _pi_mem
pi_context context_
 
std::atomic_uint32_t refCount_
 Reference counting of the handler. More...
 
enum _pi_mem::mem_type mem_type_
 
union _pi_mem::mem_ mem_
 
pi_context Context
 
char * MapHostPtr = nullptr
 
std::mutex SurfaceLock
 
unsigned int SurfaceIndex
 
std::unordered_map< void *, MappingMappings
 
std::mutex MappingsMutex
 
cm_surface_ptr_t SurfacePtr
 

Additional Inherited Members

- Public Types inherited from _pi_mem
enum  mem_type { mem_type::buffer, mem_type::surface, mem_type::buffer, mem_type::surface }
 
enum  mem_type { mem_type::buffer, mem_type::surface, mem_type::buffer, mem_type::surface }
 
enum  access_mode_t { unknown, read_write, read_only, write_only }
 
using pi_context = _pi_context *
 
using pi_context = _pi_context *
 
- Protected Member Functions inherited from _pi_mem
 _pi_mem (pi_context ctxt, char *HostPtr, cm_surface_ptr_t SurfacePtrArg, unsigned int SurfaceIdxArg)
 
 _pi_mem (pi_context Ctx)
 

Detailed Description

Definition at line 188 of file pi_esimd_emulator.hpp.

Constructor & Destructor Documentation

◆ _pi_image() [1/2]

_pi_image::_pi_image ( pi_context  ctxt,
char *  HostPtr,
cm_surface_ptr_t  SurfacePtrArg,
unsigned int  SurfaceIdxArg,
size_t  WidthArg,
size_t  HeightArg,
size_t  BPPArg 
)
inline

Definition at line 190 of file pi_esimd_emulator.hpp.

◆ _pi_image() [2/2]

_pi_image::_pi_image ( pi_context  Ctx,
ze_image_handle_t  Image 
)
inline

Definition at line 1211 of file pi_level_zero.hpp.

Member Function Documentation

◆ getZeHandle()

virtual pi_result _pi_image::getZeHandle ( char *&  ZeHandle,
access_mode_t  ,
pi_device  = nullptr 
)
inlineoverridevirtual

Implements _pi_mem.

Definition at line 1214 of file pi_level_zero.hpp.

◆ getZeHandlePtr()

virtual pi_result _pi_image::getZeHandlePtr ( char **&  ZeHandlePtr,
access_mode_t  ,
pi_device  = nullptr 
)
inlineoverridevirtual

Implements _pi_mem.

Definition at line 1219 of file pi_level_zero.hpp.

◆ isImage()

bool _pi_image::isImage ( ) const
inlineoverridevirtual

Implements _pi_mem.

Definition at line 1225 of file pi_level_zero.hpp.

Member Data Documentation

◆ BytesPerPixel

size_t _pi_image::BytesPerPixel

Definition at line 198 of file pi_esimd_emulator.hpp.

Referenced by sycl_get_cm_image_params().

◆ Height

size_t _pi_image::Height

Definition at line 197 of file pi_esimd_emulator.hpp.

Referenced by sycl_get_cm_image_params().

◆ Width

size_t _pi_image::Width

Definition at line 196 of file pi_esimd_emulator.hpp.

Referenced by sycl_get_cm_image_params().

◆ ZeImage

ze_image_handle_t _pi_image::ZeImage

Definition at line 1233 of file pi_level_zero.hpp.

◆ ZeImageDesc

ZeStruct<ze_image_desc_t> _pi_image::ZeImageDesc

Definition at line 1229 of file pi_level_zero.hpp.

Referenced by enqueueMemImageCommandHelper(), and getImageRegionHelper().


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