![]() |
Shamrock 2025.10.0
Astrophysical Code
|
This file contains the methods to actually allocate memory. More...
#include "shambackends/MemPerfInfos.hpp"#include "shambackends/USMPtrHolder.hpp"#include "shambackends/details/BufferEventHandler.hpp"
Include dependency graph for internal_alloc.hpp:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Namespaces | |
| namespace | sham |
| namespace for backends this one is named only sham since shambackends is too long to write | |
Functions | |
| template<USMKindTarget target> | |
| void * | sham::details::internal_alloc (size_t sz, const std::shared_ptr< DeviceScheduler > &dev_sched, std::optional< size_t > alignment) |
| Allocate a USM pointer with at least the given size in bytes. | |
| template<USMKindTarget target> | |
| void | sham::details::internal_free (void *usm_ptr, size_t sz, const std::shared_ptr< DeviceScheduler > &dev_sched) |
| Free a USM pointer. | |
| MemPerfInfos | sham::details::get_mem_perf_info () |
| Retrieve the memory performance information. | |
| std::string | sham::details::log_mem_perf_info (const std::shared_ptr< DeviceScheduler > &dev_sched) |
| void | sham::details::reset_mem_info_max () |
| Reset the memory information for the maximum allocated bytes. | |
This file contains the methods to actually allocate memory.
Definition in file internal_alloc.hpp.
| MemPerfInfos sham::details::get_mem_perf_info | ( | ) |
Retrieve the memory performance information.
Definition at line 123 of file internal_alloc.cpp.
Here is the call graph for this function:| void * sham::details::internal_alloc | ( | size_t | sz, |
| const std::shared_ptr< DeviceScheduler > & | dev_sched, | ||
| std::optional< size_t > | alignment | ||
| ) |
Allocate a USM pointer with at least the given size in bytes.
| sz | The minimum size of the USM pointer in bytes. |
| dev_sched | The SYCL queue used to allocate the USM pointer. |
| alignment | The alignment of the USM pointer (optional). |
Definition at line 178 of file internal_alloc.cpp.
| void sham::details::internal_free | ( | void * | usm_ptr, |
| size_t | sz, | ||
| const std::shared_ptr< DeviceScheduler > & | dev_sched | ||
| ) |
Free a USM pointer.
| usm_ptr | The pointer to free. |
| sz | The size of the USM pointer in bytes. |
| dev_sched | The SYCL queue used to free the USM pointer. |
Definition at line 147 of file internal_alloc.cpp.
| std::string sham::details::log_mem_perf_info | ( | const std::shared_ptr< DeviceScheduler > & | dev_sched | ) |
Definition at line 131 of file internal_alloc.cpp.
| void sham::details::reset_mem_info_max | ( | ) |
Reset the memory information for the maximum allocated bytes.
Definition at line 125 of file internal_alloc.cpp.
Here is the call graph for this function: