|
MathFu
An open source project by
FPL.
|
SIMD-safe memory allocator, for use with STL types like std::vector. More...
#include <utilities.h>
Inherits allocator< T >.
SIMD-safe memory allocator, for use with STL types like std::vector.
For example:
std::vector<vec4, mathfu::simd_allocator<vec4>> myvector;
| T | type allocated by this object. |
Classes | |
| struct | rebind |
| Obtains an allocator of a different type. More... | |
Public Types | |
| typedef size_t | size_type |
| Size type. | |
| typedef T * | pointer |
| Pointer of type T. | |
| typedef const T * | const_pointer |
| Const pointer of type T. | |
Public Member Functions | |
| simd_allocator () throw () | |
| Constructs a simd_allocator. | |
| simd_allocator (const simd_allocator &a) throw () | |
| Constructs and copies a simd_allocator. More... | |
| template<class U > | |
| simd_allocator (const simd_allocator< U > &a) throw () | |
| Constructs and copies a simd_allocator. More... | |
| ~simd_allocator () throw () | |
| Destructs a simd_allocator. | |
| pointer | allocate (size_type n) |
| Allocate memory for object T. More... | |
| void | deallocate (pointer p, size_type) |
|
inline | ||||||||||||||
Constructs and copies a simd_allocator.
| a | Allocator to copy. |
|
inline | ||||||||||||||
Constructs and copies a simd_allocator.
| a | Allocator to copy. |
| U | type of the object allocated by the allocator to copy. |
|
inline |
Allocate memory for object T.
| n | Number of types to allocate. |
|
inline |
Deallocate memory referenced by pointer p.
| p | Pointer to memory to deallocate. |