![]() |
|
PhoenixHardware
0.2.0
Tools to get hardware information
|
Custom allocator to align memory of std::vector. More...
#include <PAlignedAllocator.h>
Public Types | |
| typedef T | value_type |
| Value of the type of the current allocator (used by std::vector to avoid ambiguities if we use multiple template) | |
Public Member Functions | |
| PAlignedAllocator ()=default | |
| template<class U> | |
| constexpr | PAlignedAllocator (const PAlignedAllocator< U > &) noexcept |
| Copy constructor from U type. | |
Static Public Member Functions | |
| static T * | allocate (std::size_t n) |
| Do the memory allocation. | |
| static void | deallocate (T *p, std::size_t n) noexcept |
| Free the allocated memory. | |
Custom allocator to align memory of std::vector.
Definition at line 21 of file PAlignedAllocator.h.
| typedef T PAlignedAllocator< T >::value_type |
Value of the type of the current allocator (used by std::vector to avoid ambiguities if we use multiple template)
Definition at line 23 of file PAlignedAllocator.h.
|
default |
|
inlineconstexprnoexcept |
|
inlinestatic |
Do the memory allocation.
| n | : number of element to be allocated |
Definition at line 36 of file PAlignedAllocator.h.
References phoenix_template_alloc_aligned1d().
Here is the call graph for this function:
|
inlinestaticnoexcept |
Free the allocated memory.
| p | : pointer to be freed |
| n | : number of element allocated in p |
Definition at line 50 of file PAlignedAllocator.h.
References phoenix_freeAlignedVector().
Here is the call graph for this function: