9#include "../wrapped/vae_profiler.hpp"
11namespace vae {
namespace core {
namespace memory {
16 template <
class T,
class NAME>
22 template <
class U,
class J >
30 if (
auto ptr =
static_cast<T*
>(
malloc(n *
sizeof(T)))) {
47 template <
class T,
class U,
class J >
52 template <
class T,
class U,
class J >
#define malloc(size)
Force all other standart allocation operators to use the ones provided by tklb.
T max(const T &v1, const T &v2)
bool operator==(const Allocator< T, J > &, const Allocator< U, J > &)
I don't even know what this does, but it has to be here for some classes using.
bool operator!=(const Allocator< T, J > &, const Allocator< U, J > &)
Contains Typedefinitions and basic structures use by the public API and internally.
Allocator used for all heapbuffers in VAE.
T * allocate(size_t n) noexcept
Allocator(const Allocator &)=default
void deallocate(T *ptr, std::size_t n) noexcept
Allocator(const Allocator< U, J > &)
static constexpr const char * name
This is here to get a name into the allocator without writing the whole thing again.
static constexpr const char * name
static constexpr const char * name
static constexpr const char * name
#define VAE_PROFILER_FREE_L(ptr, name)
Track named allocaions.
#define VAE_PROFILER_MALLOC_L(ptr, size, name)
Track named allocaions.