22 return static_cast<T *
>(m_mem.allocate(
n *
sizeof(
T),
alignof(
T)));
32 m_mem.deallocate(
p,
n *
sizeof(
T),
alignof(
T));
35template <
typename T,
typename...
Args>
50 return new (
p)
T(std::forward<Args>(
args)...);
T * allocate_object(std::size_t n=1)
Allocate space for (a number of) objects.
Definition allocator.ipp:15
T * new_object(Args &&... args)
Allocate and construct a new object.
Definition allocator.ipp:36
void deallocate_object(T *p, std::size_t n=1)
Deallocate space for (a number of) objects.
Definition allocator.ipp:26
void delete_object(T *p)
Deconstruct and deallocate an object.
Definition allocator.ipp:54
Main namespace for the vecmem classes/functions.
Definition atomic_ref.hpp:16
std::vector< T, vecmem::polymorphic_allocator< T > > vector
Alias type for vectors with our polymorphic allocator.
Definition vector.hpp:35