DPC++ Runtime
Runtime libraries for oneAPI DPC++
memory_manager.cpp File Reference
#include <detail/context_impl.hpp>
#include <detail/device_image_impl.hpp>
#include <detail/event_impl.hpp>
#include <detail/mem_alloc_helper.hpp>
#include <detail/memory_manager.hpp>
#include <detail/pi_utils.hpp>
#include <detail/queue_impl.hpp>
#include <detail/xpti_registry.hpp>
#include <sycl/usm/usm_enums.hpp>
#include <sycl/usm/usm_pointer_info.hpp>
#include <sycl/ext/oneapi/bindless_images_memory.hpp>
#include <algorithm>
#include <cassert>
#include <cstring>
#include <vector>
Include dependency graph for memory_manager.cpp:

Go to the source code of this file.

Classes

struct  sycl::_V1::detail::TermPositions
 

Namespaces

 sycl
 
 sycl::_V1
 
 sycl::_V1::detail
 

Functions

uint64_t sycl::_V1::detail::emitMemAllocBeginTrace (uintptr_t ObjHandle, size_t AllocSize, size_t GuardZone)
 
void sycl::_V1::detail::emitMemAllocEndTrace (uintptr_t ObjHandle, uintptr_t AllocPtr, size_t AllocSize, size_t GuardZone, uint64_t CorrelationID)
 
uint64_t sycl::_V1::detail::emitMemReleaseBeginTrace (uintptr_t ObjHandle, uintptr_t AllocPtr)
 
void sycl::_V1::detail::emitMemReleaseEndTrace (uintptr_t ObjHandle, uintptr_t AllocPtr, uint64_t CorrelationID)
 
static void sycl::_V1::detail::waitForEvents (const std::vector< EventImplPtr > &Events)
 
void sycl::_V1::detail::memBufferCreateHelper (const PluginPtr &Plugin, pi_context Ctx, pi_mem_flags Flags, size_t Size, void *HostPtr, pi_mem *RetMem, const pi_mem_properties *Props=nullptr)
 
void sycl::_V1::detail::memReleaseHelper (const PluginPtr &Plugin, pi_mem Mem)
 
void sycl::_V1::detail::memBufferMapHelper (const PluginPtr &Plugin, pi_queue command_queue, pi_mem buffer, pi_bool blocking_map, pi_map_flags map_flags, size_t offset, size_t size, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event, void **ret_map)
 
void sycl::_V1::detail::memUnmapHelper (const PluginPtr &Plugin, pi_queue command_queue, pi_mem memobj, void *mapped_ptr, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event)
 
static sycl::detail::pi::PiMemFlags sycl::_V1::detail::getMemObjCreationFlags (void *UserPtr, bool HostPtrReadOnly)
 
void sycl::_V1::detail::prepTermPositions (TermPositions &pos, int Dimensions, detail::SYCLMemObjI::MemObjType Type)
 
void sycl::_V1::detail::copyH2D (SYCLMemObjI *SYCLMemObj, char *SrcMem, QueueImplPtr, unsigned int DimSrc, sycl::range< 3 > SrcSize, sycl::range< 3 > SrcAccessRange, sycl::id< 3 > SrcOffset, unsigned int SrcElemSize, sycl::detail::pi::PiMem DstMem, QueueImplPtr TgtQueue, unsigned int DimDst, sycl::range< 3 > DstSize, sycl::range< 3 > DstAccessRange, sycl::id< 3 > DstOffset, unsigned int DstElemSize, std::vector< sycl::detail::pi::PiEvent > DepEvents, sycl::detail::pi::PiEvent &OutEvent, const detail::EventImplPtr &OutEventImpl)
 
void sycl::_V1::detail::copyD2H (SYCLMemObjI *SYCLMemObj, sycl::detail::pi::PiMem SrcMem, QueueImplPtr SrcQueue, unsigned int DimSrc, sycl::range< 3 > SrcSize, sycl::range< 3 > SrcAccessRange, sycl::id< 3 > SrcOffset, unsigned int SrcElemSize, char *DstMem, QueueImplPtr, unsigned int DimDst, sycl::range< 3 > DstSize, sycl::range< 3 > DstAccessRange, sycl::id< 3 > DstOffset, unsigned int DstElemSize, std::vector< sycl::detail::pi::PiEvent > DepEvents, sycl::detail::pi::PiEvent &OutEvent, const detail::EventImplPtr &OutEventImpl)
 
void sycl::_V1::detail::copyD2D (SYCLMemObjI *SYCLMemObj, sycl::detail::pi::PiMem SrcMem, QueueImplPtr SrcQueue, unsigned int DimSrc, sycl::range< 3 > SrcSize, sycl::range< 3 > SrcAccessRange, sycl::id< 3 > SrcOffset, unsigned int SrcElemSize, sycl::detail::pi::PiMem DstMem, QueueImplPtr, unsigned int DimDst, sycl::range< 3 > DstSize, sycl::range< 3 >, sycl::id< 3 > DstOffset, unsigned int DstElemSize, std::vector< sycl::detail::pi::PiEvent > DepEvents, sycl::detail::pi::PiEvent &OutEvent, const detail::EventImplPtr &OutEventImpl)
 
static void sycl::_V1::detail::copyH2H (SYCLMemObjI *, char *SrcMem, QueueImplPtr, unsigned int DimSrc, sycl::range< 3 > SrcSize, sycl::range< 3 > SrcAccessRange, sycl::id< 3 > SrcOffset, unsigned int SrcElemSize, char *DstMem, QueueImplPtr, unsigned int DimDst, sycl::range< 3 > DstSize, sycl::range< 3 > DstAccessRange, sycl::id< 3 > DstOffset, unsigned int DstElemSize, std::vector< sycl::detail::pi::PiEvent >, sycl::detail::pi::PiEvent &, const detail::EventImplPtr &)
 
static void sycl::_V1::detail::memcpyToDeviceGlobalUSM (QueueImplPtr Queue, DeviceGlobalMapEntry *DeviceGlobalEntry, size_t NumBytes, size_t Offset, const void *Src, const std::vector< sycl::detail::pi::PiEvent > &DepEvents, sycl::detail::pi::PiEvent *OutEvent, const detail::EventImplPtr &OutEventImpl)
 
static void sycl::_V1::detail::memcpyFromDeviceGlobalUSM (QueueImplPtr Queue, DeviceGlobalMapEntry *DeviceGlobalEntry, size_t NumBytes, size_t Offset, void *Dest, const std::vector< sycl::detail::pi::PiEvent > &DepEvents, sycl::detail::pi::PiEvent *OutEvent, const detail::EventImplPtr &OutEventImpl)
 
static sycl::detail::pi::PiProgram sycl::_V1::detail::getOrBuildProgramForDeviceGlobal (QueueImplPtr Queue, DeviceGlobalMapEntry *DeviceGlobalEntry)
 
static void sycl::_V1::detail::memcpyToDeviceGlobalDirect (QueueImplPtr Queue, DeviceGlobalMapEntry *DeviceGlobalEntry, size_t NumBytes, size_t Offset, const void *Src, const std::vector< sycl::detail::pi::PiEvent > &DepEvents, sycl::detail::pi::PiEvent *OutEvent)
 
static void sycl::_V1::detail::memcpyFromDeviceGlobalDirect (QueueImplPtr Queue, DeviceGlobalMapEntry *DeviceGlobalEntry, size_t NumBytes, size_t Offset, void *Dest, const std::vector< sycl::detail::pi::PiEvent > &DepEvents, sycl::detail::pi::PiEvent *OutEvent)