Vc
1.0.0-dev
SIMD Vector Classes for C++
|
|
An allocator that uses global new and supports over-aligned types, as per [C++11 20.6.9].
Meant as a simple replacement for the allocator defined in the C++ Standard. Allocation is done using the global new/delete operators. But if the alignment property of T
is larger than the size of a pointer, the allocate function allocates slightly more memory to adjust the pointer for correct alignment.
If the T
does not require over-alignment no additional memory will be allocated.
T | The type of objects to allocate. |
Example:
Vc ships a macro to conveniently tell STL to use Vc::Allocator per default for a given type:
#include <Vc/Allocator>