Standard-compliant allocator handling the allocation and deallocation of segment of aligned memory. More...
#include <eve/memory/aligned_allocator.hpp>
Required header: #include <eve/memory/aligned_allocator.hpp>
By default, allocation will be aligned on current architecture's SIMD compatible alignment but can be specified otherwise.
aligned_allocator is designed ot be used through std::allocator_traits, so it provides the minimal amount of members and members types.
T | Type to allocate |
Lanes | Alignment constraint to uphold. Default value is computed to be compatible with current SIMD ABI requirements. |
Classes | |
struct | rebind |
Convert an aligned_allocator type to another. More... | |
Public Types | |
using | value_type = T |
type to allocate, i.e T | |
Public Member Functions | |
aligned_allocator () noexcept | |
Default constructor. | |
template<typename U > | |
aligned_allocator (aligned_allocator< U, Lanes > const &) noexcept | |
Copy constructor. | |
value_type * | allocate (std::size_t n) |
Allocates aligned, uninitialized storage for n elements of type T . | |
void | deallocate (value_type *p, std::size_t) noexcept |
Deallocates aligned storage. | |
Static Public Member Functions | |
static constexpr auto | alignment () noexcept |
Return the value of the alignment constraint. | |
Related Symbols | |
(Note that these are not member symbols.) | |
template<typename T , typename U , typename A , typename B > | |
bool | operator== (aligned_allocator< T, A > const &, aligned_allocator< U, B > const &) noexcept |
Compares aligned_allocators for equality of types and alignment constraints. | |
template<typename T , typename U , typename A , typename B > | |
bool | operator!= (aligned_allocator< T, A > const &, aligned_allocator< U, B > const &) noexcept |
Compares aligned_allocators for inequality of types or alignment constraints. | |