12#include "vecmem/memory/memory_resource.hpp"
16#include <unordered_map>
26 std::function<memory_resource&(std::size_t, std::size_t)> decision);
29 void*
allocate(std::size_t size, std::size_t align);
31 void deallocate(
void* p, std::size_t size, std::size_t align);
35 std::unordered_map<void*, std::reference_wrapper<memory_resource>>
39 std::function<memory_resource&(std::size_t, std::size_t)> m_decision;
void deallocate(void *p, std::size_t size, std::size_t align)
Deallocate previously allocated memory.
Definition choice_memory_resource_impl.cpp:42
void * allocate(std::size_t size, std::size_t align)
Allocate memory with a chosen memory resource.
Definition choice_memory_resource_impl.cpp:21
choice_memory_resource_impl(std::function< memory_resource &(std::size_t, std::size_t)> decision)
Constructor.
Definition choice_memory_resource_impl.cpp:17
Namespace for types that should not be used directly by clients.
Definition array.hpp:23