STL-compliant allocator that allocates aligned memory.
T | Type of the element to allocate. |
Alignment | Alignment of the allocation, e.g. 16. |
#include <AlignedAllocator.h>
Classes | |
struct | rebind |
Defines an aligned allocator suitable for allocating elements of type U . More... | |
Public Types | |
typedef std::allocator< T >::size_type | size_type |
typedef std::allocator< T >::pointer | pointer |
typedef std::allocator< T >::const_pointer | const_pointer |
Public Member Functions | |
aligned_allocator () throw () | |
Default-constructs an allocator. More... | |
aligned_allocator (const aligned_allocator &other) throw () | |
Copy-constructs an allocator. More... | |
template<class U > | |
aligned_allocator (const aligned_allocator< U, Alignment > &) throw () | |
Convert-constructs an allocator. More... | |
~aligned_allocator () throw () | |
Destroys an allocator. More... | |
pointer | allocate (size_type n) |
Allocates n elements of type T , aligned to a multiple of Alignment . More... | |
pointer | allocate (size_type n, const_pointer) |
Allocates n elements of type T , aligned to a multiple of Alignment . More... | |
void | deallocate (pointer p, size_type) |
Frees the memory previously allocated by an aligned allocator. More... | |
typedef std::allocator<T>::const_pointer walberla::simd::aligned_allocator< T, Alignment >::const_pointer |
typedef std::allocator<T>::pointer walberla::simd::aligned_allocator< T, Alignment >::pointer |
typedef std::allocator<T>::size_type walberla::simd::aligned_allocator< T, Alignment >::size_type |
|
inline |
Default-constructs an allocator.
|
inline |
Copy-constructs an allocator.
|
inline |
Convert-constructs an allocator.
|
inline |
Destroys an allocator.
|
inline |
Allocates n
elements of type T
, aligned to a multiple of Alignment
.
|
inline |
Allocates n
elements of type T
, aligned to a multiple of Alignment
.
|
inline |
Frees the memory previously allocated by an aligned allocator.