DPC++ Runtime
Runtime libraries for oneAPI DPC++
USMMemoryAllocBase Class Referenceabstract

#include <level_zero/pi_level_zero.hpp>

Inheritance diagram for USMMemoryAllocBase:
Collaboration diagram for USMMemoryAllocBase:

Public Member Functions

 USMMemoryAllocBase (pi_context Ctx, pi_device Dev)
 
void * allocate (size_t Size) override final
 
void * allocate (size_t Size, size_t Alignment) override final
 
void deallocate (void *Ptr, bool OwnZeMemHandle) override final
 
MemType getMemType () override final
 
- Public Member Functions inherited from SystemMemory
virtual ~SystemMemory ()=default
 

Protected Member Functions

virtual pi_result allocateImpl (void **ResultPtr, size_t Size, pi_uint32 Alignment)=0
 
virtual MemType getMemTypeImpl ()=0
 

Protected Attributes

pi_context Context
 
pi_device Device
 

Detailed Description

Definition at line 393 of file pi_level_zero.hpp.

Constructor & Destructor Documentation

◆ USMMemoryAllocBase()

USMMemoryAllocBase::USMMemoryAllocBase ( pi_context  Ctx,
pi_device  Dev 
)
inline

Definition at line 404 of file pi_level_zero.hpp.

Member Function Documentation

◆ allocate() [1/2]

void * USMMemoryAllocBase::allocate ( size_t  Size)
finaloverridevirtual

Implements SystemMemory.

Definition at line 7770 of file pi_level_zero.cpp.

◆ allocate() [2/2]

void * USMMemoryAllocBase::allocate ( size_t  Size,
size_t  Alignment 
)
finaloverridevirtual

Implements SystemMemory.

Definition at line 7781 of file pi_level_zero.cpp.

◆ allocateImpl()

virtual pi_result USMMemoryAllocBase::allocateImpl ( void **  ResultPtr,
size_t  Size,
pi_uint32  Alignment 
)
protectedpure virtual

◆ deallocate()

void USMMemoryAllocBase::deallocate ( void *  Ptr,
bool  OwnZeMemHandle 
)
finaloverridevirtual

Implements SystemMemory.

Definition at line 7791 of file pi_level_zero.cpp.

References _pi_queue::Context, and USMFreeImpl().

◆ getMemType()

MemType USMMemoryAllocBase::getMemType ( )
finaloverridevirtual

Implements SystemMemory.

Definition at line 7798 of file pi_level_zero.cpp.

◆ getMemTypeImpl()

virtual MemType USMMemoryAllocBase::getMemTypeImpl ( )
protectedpure virtual

Member Data Documentation

◆ Context

pi_context USMMemoryAllocBase::Context
protected

Definition at line 395 of file pi_level_zero.hpp.

Referenced by _pi_program::_pi_program().

◆ Device

pi_device USMMemoryAllocBase::Device
protected

Definition at line 396 of file pi_level_zero.hpp.

Referenced by _pi_device::_pi_device(), and _pi_context::isValidDevice().


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