FX::aligned_allocator< T, alignment > Class Template Reference
[Custom memory allocation infrastructure]

#include <FXMemoryPool.h>

List of all members.


Detailed Description

template<typename T, int alignment>
class FX::aligned_allocator< T, alignment >

An aligning memory allocator for the STL.

Working with SIMD data (e.g. FX::Maths::Vector) can need memory aligned data. This custom STL allocator ensures that STL containers only use aligned allocations.

Definition at line 147 of file FXMemoryPool.h.

Public Types

typedef T * pointer
typedef const T * const_pointer
typedef T & reference
typedef const T & const_reference
typedef T value_type
typedef size_t size_type
typedef ptrdiff_t difference_type

Public Member Functions

T * address (T &r) const
const T * address (const T &s) const
size_t max_size () const
bool operator!= (const aligned_allocator &other) const
bool operator== (const aligned_allocator &other) const
void construct (T *const p, const T &t) const
void destroy (T *const p) const
 aligned_allocator ()
 aligned_allocator (const aligned_allocator &)
template<typename U>
 aligned_allocator (const aligned_allocator< U, alignment > &)
T * allocate (const size_t n) const
void deallocate (T *p, const size_t n) const
template<typename U>
T * allocate (const size_t n, const U *) const

Classes

struct  rebind


The documentation for this class was generated from the following file:
(C) 2002-2009 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Nov 20 18:35:01 2009 for TnFOX by doxygen v1.4.7