DPC++ Runtime
Runtime libraries for oneAPI DPC++
cl::sycl::detail::MemoryManager Class Reference

#include <CL/sycl/detail/memory_manager.hpp>

Collaboration diagram for cl::sycl::detail::MemoryManager:

Public Member Functions

 __SYCL_DEPRECATED ("copy_usm() accepting PiEvent& is deprecated, use " "copy_usm() accepting PiEvent* instead") static void copy_usm(const void *SrcMem
 
 __SYCL_DEPRECATED ("fill_usm() accepting PiEvent& is deprecated, use " "fill_usm() accepting PiEvent* instead") static void fill_usm(void *DstMem
 
 __SYCL_DEPRECATED ("prefetch_usm() accepting PiEvent& is deprecated, use " "prefetch_usm() accepting PiEvent* instead") static void prefetch_usm(void *Ptr
 
 __SYCL_DEPRECATED ("advise_usm() accepting PiEvent& is deprecated, use " "advise_usm() accepting PiEvent* instead") static void advise_usm(const void *Ptr
 

Static Public Member Functions

static void release (ContextImplPtr TargetContext, SYCLMemObjI *MemObj, void *MemAllocation, std::vector< EventImplPtr > DepEvents, RT::PiEvent &OutEvent)
 
static void * allocate (ContextImplPtr TargetContext, SYCLMemObjI *MemObj, bool InitFromUserData, void *HostPtr, std::vector< EventImplPtr > DepEvents, RT::PiEvent &OutEvent)
 
static void * wrapIntoImageBuffer (ContextImplPtr TargetContext, void *MemBuf, SYCLMemObjI *MemObj)
 
static void releaseImageBuffer (ContextImplPtr TargetContext, void *ImageBuf)
 
static void * allocateMemSubBuffer (ContextImplPtr TargetContext, void *ParentMemObj, size_t ElemSize, size_t Offset, range< 3 > Range, std::vector< EventImplPtr > DepEvents, RT::PiEvent &OutEvent)
 
static void * allocateMemBuffer (ContextImplPtr TargetContext, SYCLMemObjI *MemObj, void *UserPtr, bool HostPtrReadOnly, size_t Size, const EventImplPtr &InteropEvent, const ContextImplPtr &InteropContext, const sycl::property_list &PropsList, RT::PiEvent &OutEventToWait)
 
static void * allocateMemImage (ContextImplPtr TargetContext, SYCLMemObjI *MemObj, void *UserPtr, bool HostPtrReadOnly, size_t Size, const RT::PiMemImageDesc &Desc, const RT::PiMemImageFormat &Format, const EventImplPtr &InteropEvent, const ContextImplPtr &InteropContext, const sycl::property_list &PropsList, RT::PiEvent &OutEventToWait)
 
static void releaseMemObj (ContextImplPtr TargetContext, SYCLMemObjI *MemObj, void *MemAllocation, void *UserPtr)
 
static void * allocateHostMemory (SYCLMemObjI *MemObj, void *UserPtr, bool HostPtrReadOnly, size_t Size, const sycl::property_list &PropsList)
 
static void * allocateInteropMemObject (ContextImplPtr TargetContext, void *UserPtr, const EventImplPtr &InteropEvent, const ContextImplPtr &InteropContext, const sycl::property_list &PropsList, RT::PiEvent &OutEventToWait)
 
static void * allocateImageObject (ContextImplPtr TargetContext, void *UserPtr, bool HostPtrReadOnly, const RT::PiMemImageDesc &Desc, const RT::PiMemImageFormat &Format, const sycl::property_list &PropsList)
 
static void * allocateBufferObject (ContextImplPtr TargetContext, void *UserPtr, bool HostPtrReadOnly, const size_t Size, const sycl::property_list &PropsList)
 
static void copy (SYCLMemObjI *SYCLMemObj, void *SrcMem, QueueImplPtr SrcQueue, unsigned int DimSrc, sycl::range< 3 > SrcSize, sycl::range< 3 > SrcAccessRange, sycl::id< 3 > SrcOffset, unsigned int SrcElemSize, void *DstMem, QueueImplPtr TgtQueue, unsigned int DimDst, sycl::range< 3 > DstSize, sycl::range< 3 > DstAccessRange, sycl::id< 3 > DstOffset, unsigned int DstElemSize, std::vector< RT::PiEvent > DepEvents, RT::PiEvent &OutEvent)
 
static void fill (SYCLMemObjI *SYCLMemObj, void *Mem, QueueImplPtr Queue, size_t PatternSize, const char *Pattern, unsigned int Dim, sycl::range< 3 > Size, sycl::range< 3 > AccessRange, sycl::id< 3 > AccessOffset, unsigned int ElementSize, std::vector< RT::PiEvent > DepEvents, RT::PiEvent &OutEvent)
 
static void * map (SYCLMemObjI *SYCLMemObj, void *Mem, QueueImplPtr Queue, access::mode AccessMode, unsigned int Dim, sycl::range< 3 > Size, sycl::range< 3 > AccessRange, sycl::id< 3 > AccessOffset, unsigned int ElementSize, std::vector< RT::PiEvent > DepEvents, RT::PiEvent &OutEvent)
 
static void unmap (SYCLMemObjI *SYCLMemObj, void *Mem, QueueImplPtr Queue, void *MappedPtr, std::vector< RT::PiEvent > DepEvents, RT::PiEvent &OutEvent)
 
static void copy_usm (const void *SrcMem, QueueImplPtr Queue, size_t Len, void *DstMem, std::vector< RT::PiEvent > DepEvents, RT::PiEvent *OutEvent)
 
static void fill_usm (void *DstMem, QueueImplPtr Queue, size_t Len, int Pattern, std::vector< RT::PiEvent > DepEvents, RT::PiEvent *OutEvent)
 
static void prefetch_usm (void *Ptr, QueueImplPtr Queue, size_t Len, std::vector< RT::PiEvent > DepEvents, RT::PiEvent *OutEvent)
 
static void advise_usm (const void *Ptr, QueueImplPtr Queue, size_t Len, pi_mem_advice Advice, std::vector< RT::PiEvent > DepEvents, RT::PiEvent *OutEvent)
 

Public Attributes

QueueImplPtr Queue
 
QueueImplPtr size_t Len
 
QueueImplPtr size_t void * DstMem
 
QueueImplPtr size_t void std::vector< RT::PiEventDepEvents
 
QueueImplPtr size_t void std::vector< RT::PiEvent > RT::PiEventOutEvent
 
QueueImplPtr size_t int Pattern
 
QueueImplPtr size_t int std::vector< RT::PiEventDepEvents
 
QueueImplPtr size_t int std::vector< RT::PiEvent > RT::PiEventOutEvent
 
QueueImplPtr size_t std::vector< RT::PiEventDepEvents
 
QueueImplPtr size_t std::vector< RT::PiEvent > RT::PiEventOutEvent
 
QueueImplPtr size_t pi_mem_advice Advice
 
QueueImplPtr size_t pi_mem_advice std::vector< RT::PiEventDepEvents
 
QueueImplPtr size_t pi_mem_advice std::vector< RT::PiEvent > RT::PiEventOutEvent
 

Detailed Description

Definition at line 36 of file memory_manager.hpp.

Member Function Documentation

◆ __SYCL_DEPRECATED() [1/4]

cl::sycl::detail::MemoryManager::__SYCL_DEPRECATED ( "advise_usm() accepting PiEvent& is  deprecated,
use " "advise_usm() accepting PiEvent *instead  
) const

◆ __SYCL_DEPRECATED() [2/4]

cl::sycl::detail::MemoryManager::__SYCL_DEPRECATED ( "copy_usm() accepting PiEvent& is  deprecated,
use " "copy_usm() accepting PiEvent *instead  
) const

◆ __SYCL_DEPRECATED() [3/4]

cl::sycl::detail::MemoryManager::__SYCL_DEPRECATED ( "fill_usm() accepting PiEvent& is  deprecated,
use " "fill_usm() accepting PiEvent *instead  
)

◆ __SYCL_DEPRECATED() [4/4]

cl::sycl::detail::MemoryManager::__SYCL_DEPRECATED ( "prefetch_usm() accepting PiEvent& is  deprecated,
use " "prefetch_usm() accepting PiEvent *instead  
)

◆ advise_usm()

void cl::sycl::detail::MemoryManager::advise_usm ( const void *  Ptr,
QueueImplPtr  Queue,
size_t  Len,
pi_mem_advice  Advice,
std::vector< RT::PiEvent DepEvents,
RT::PiEvent OutEvent 
)
static

◆ allocate()

void * cl::sycl::detail::MemoryManager::allocate ( ContextImplPtr  TargetContext,
SYCLMemObjI MemObj,
bool  InitFromUserData,
void *  HostPtr,
std::vector< EventImplPtr DepEvents,
RT::PiEvent OutEvent 
)
static

◆ allocateBufferObject()

void * cl::sycl::detail::MemoryManager::allocateBufferObject ( ContextImplPtr  TargetContext,
void *  UserPtr,
bool  HostPtrReadOnly,
const size_t  Size,
const sycl::property_list PropsList 
)
static

◆ allocateHostMemory()

void * cl::sycl::detail::MemoryManager::allocateHostMemory ( SYCLMemObjI MemObj,
void *  UserPtr,
bool  HostPtrReadOnly,
size_t  Size,
const sycl::property_list PropsList 
)
static

◆ allocateImageObject()

void * cl::sycl::detail::MemoryManager::allocateImageObject ( ContextImplPtr  TargetContext,
void *  UserPtr,
bool  HostPtrReadOnly,
const RT::PiMemImageDesc Desc,
const RT::PiMemImageFormat Format,
const sycl::property_list PropsList 
)
static

◆ allocateInteropMemObject()

void * cl::sycl::detail::MemoryManager::allocateInteropMemObject ( ContextImplPtr  TargetContext,
void *  UserPtr,
const EventImplPtr InteropEvent,
const ContextImplPtr InteropContext,
const sycl::property_list PropsList,
RT::PiEvent OutEventToWait 
)
static

Definition at line 310 of file memory_manager.cpp.

References cl::sycl::detail::plugin::call(), and piEventRetain().

◆ allocateMemBuffer()

void * cl::sycl::detail::MemoryManager::allocateMemBuffer ( ContextImplPtr  TargetContext,
SYCLMemObjI MemObj,
void *  UserPtr,
bool  HostPtrReadOnly,
size_t  Size,
const EventImplPtr InteropEvent,
const ContextImplPtr InteropContext,
const sycl::property_list PropsList,
RT::PiEvent OutEventToWait 
)
static

Definition at line 384 of file memory_manager.cpp.

◆ allocateMemImage()

void * cl::sycl::detail::MemoryManager::allocateMemImage ( ContextImplPtr  TargetContext,
SYCLMemObjI MemObj,
void *  UserPtr,
bool  HostPtrReadOnly,
size_t  Size,
const RT::PiMemImageDesc Desc,
const RT::PiMemImageFormat Format,
const EventImplPtr InteropEvent,
const ContextImplPtr InteropContext,
const sycl::property_list PropsList,
RT::PiEvent OutEventToWait 
)
static

◆ allocateMemSubBuffer()

void * cl::sycl::detail::MemoryManager::allocateMemSubBuffer ( ContextImplPtr  TargetContext,
void *  ParentMemObj,
size_t  ElemSize,
size_t  Offset,
range< 3 >  Range,
std::vector< EventImplPtr DepEvents,
RT::PiEvent OutEvent 
)
static

◆ copy()

void cl::sycl::detail::MemoryManager::copy ( SYCLMemObjI SYCLMemObj,
void *  SrcMem,
QueueImplPtr  SrcQueue,
unsigned int  DimSrc,
sycl::range< 3 >  SrcSize,
sycl::range< 3 >  SrcAccessRange,
sycl::id< 3 >  SrcOffset,
unsigned int  SrcElemSize,
void *  DstMem,
QueueImplPtr  TgtQueue,
unsigned int  DimDst,
sycl::range< 3 >  DstSize,
sycl::range< 3 >  DstAccessRange,
sycl::id< 3 >  DstOffset,
unsigned int  DstElemSize,
std::vector< RT::PiEvent DepEvents,
RT::PiEvent OutEvent 
)
static

◆ copy_usm()

void cl::sycl::detail::MemoryManager::copy_usm ( const void *  SrcMem,
QueueImplPtr  Queue,
size_t  Len,
void *  DstMem,
std::vector< RT::PiEvent DepEvents,
RT::PiEvent OutEvent 
)
static

◆ fill()

void cl::sycl::detail::MemoryManager::fill ( SYCLMemObjI SYCLMemObj,
void *  Mem,
QueueImplPtr  Queue,
size_t  PatternSize,
const char Pattern,
unsigned int  Dim,
sycl::range< 3 >  Size,
sycl::range< 3 >  AccessRange,
sycl::id< 3 >  AccessOffset,
unsigned int  ElementSize,
std::vector< RT::PiEvent DepEvents,
RT::PiEvent OutEvent 
)
static

◆ fill_usm()

void cl::sycl::detail::MemoryManager::fill_usm ( void *  DstMem,
QueueImplPtr  Queue,
size_t  Len,
int  Pattern,
std::vector< RT::PiEvent DepEvents,
RT::PiEvent OutEvent 
)
static

◆ map()

void * cl::sycl::detail::MemoryManager::map ( SYCLMemObjI SYCLMemObj,
void *  Mem,
QueueImplPtr  Queue,
access::mode  AccessMode,
unsigned int  Dim,
sycl::range< 3 >  Size,
sycl::range< 3 >  AccessRange,
sycl::id< 3 >  AccessOffset,
unsigned int  ElementSize,
std::vector< RT::PiEvent DepEvents,
RT::PiEvent OutEvent 
)
static

◆ prefetch_usm()

void cl::sycl::detail::MemoryManager::prefetch_usm ( void *  Ptr,
QueueImplPtr  Queue,
size_t  Len,
std::vector< RT::PiEvent DepEvents,
RT::PiEvent OutEvent 
)
static

◆ release()

void cl::sycl::detail::MemoryManager::release ( ContextImplPtr  TargetContext,
SYCLMemObjI MemObj,
void *  MemAllocation,
std::vector< EventImplPtr DepEvents,
RT::PiEvent OutEvent 
)
static

◆ releaseImageBuffer()

void cl::sycl::detail::MemoryManager::releaseImageBuffer ( ContextImplPtr  TargetContext,
void *  ImageBuf 
)
static

Definition at line 246 of file memory_manager.cpp.

◆ releaseMemObj()

void cl::sycl::detail::MemoryManager::releaseMemObj ( ContextImplPtr  TargetContext,
SYCLMemObjI MemObj,
void *  MemAllocation,
void *  UserPtr 
)
static

◆ unmap()

void cl::sycl::detail::MemoryManager::unmap ( SYCLMemObjI SYCLMemObj,
void *  Mem,
QueueImplPtr  Queue,
void *  MappedPtr,
std::vector< RT::PiEvent DepEvents,
RT::PiEvent OutEvent 
)
static

Definition at line 847 of file memory_manager.cpp.

References cl::sycl::detail::memUnmapHelper().

◆ wrapIntoImageBuffer()

void * cl::sycl::detail::MemoryManager::wrapIntoImageBuffer ( ContextImplPtr  TargetContext,
void *  MemBuf,
SYCLMemObjI MemObj 
)
static

Definition at line 285 of file memory_manager.cpp.

Member Data Documentation

◆ Advice

QueueImplPtr size_t pi_mem_advice cl::sycl::detail::MemoryManager::Advice

Definition at line 181 of file memory_manager.hpp.

◆ DepEvents [1/4]

QueueImplPtr size_t void std::vector<RT::PiEvent> cl::sycl::detail::MemoryManager::DepEvents

Definition at line 150 of file memory_manager.hpp.

◆ DepEvents [2/4]

QueueImplPtr size_t int std::vector<RT::PiEvent> cl::sycl::detail::MemoryManager::DepEvents

Definition at line 160 of file memory_manager.hpp.

◆ DepEvents [3/4]

QueueImplPtr size_t std::vector<RT::PiEvent> cl::sycl::detail::MemoryManager::DepEvents

Definition at line 170 of file memory_manager.hpp.

◆ DepEvents [4/4]

QueueImplPtr size_t pi_mem_advice std::vector<RT::PiEvent> cl::sycl::detail::MemoryManager::DepEvents

Definition at line 182 of file memory_manager.hpp.

◆ DstMem

QueueImplPtr size_t void* cl::sycl::detail::MemoryManager::DstMem

Definition at line 150 of file memory_manager.hpp.

◆ Len

QueueImplPtr size_t cl::sycl::detail::MemoryManager::Len

Definition at line 149 of file memory_manager.hpp.

◆ OutEvent [1/4]

QueueImplPtr size_t void std::vector<RT::PiEvent> RT::PiEvent& cl::sycl::detail::MemoryManager::OutEvent

Definition at line 151 of file memory_manager.hpp.

◆ OutEvent [2/4]

QueueImplPtr size_t int std::vector<RT::PiEvent> RT::PiEvent& cl::sycl::detail::MemoryManager::OutEvent

Definition at line 161 of file memory_manager.hpp.

◆ OutEvent [3/4]

QueueImplPtr size_t std::vector<RT::PiEvent> RT::PiEvent& cl::sycl::detail::MemoryManager::OutEvent

Definition at line 171 of file memory_manager.hpp.

◆ OutEvent [4/4]

QueueImplPtr size_t pi_mem_advice std::vector<RT::PiEvent> RT::PiEvent& cl::sycl::detail::MemoryManager::OutEvent

Definition at line 183 of file memory_manager.hpp.

◆ Pattern

QueueImplPtr size_t int cl::sycl::detail::MemoryManager::Pattern

Definition at line 160 of file memory_manager.hpp.

◆ Queue

QueueImplPtr cl::sycl::detail::MemoryManager::Queue

Definition at line 149 of file memory_manager.hpp.


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