Classes | Public Types | Public Member Functions
aligned_allocator< T > Class Template Reference

STL compatible allocator to use with with 16 byte aligned types. More...

#include <Memory.h>

List of all members.

Classes

struct  rebind

Public Types

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

Public Member Functions

pointer address (reference value) const
const_pointer address (const_reference value) const
 aligned_allocator ()
 aligned_allocator (const aligned_allocator &)
template<class U >
 aligned_allocator (const aligned_allocator< U > &)
pointer allocate (size_type num, const void *hint=0)
void construct (pointer p, const T &value)
void deallocate (pointer p, size_type)
void destroy (pointer p)
size_type max_size () const
bool operator!= (const aligned_allocator< T > &) const
bool operator== (const aligned_allocator< T > &) const
 ~aligned_allocator ()

Detailed Description

template<class T>
class Eigen::aligned_allocator< T >

STL compatible allocator to use with with 16 byte aligned types.

Example:

 // Matrix4f requires 16 bytes alignment:
 std::map< int, Matrix4f, std::less<int>, 
           aligned_allocator<std::pair<const int, Matrix4f> > > my_map_mat4;
 // Vector3f does not require 16 bytes alignment, no need to use Eigen's allocator:
 std::map< int, Vector3f > my_map_vec3;
See also:
Using STL Containers with Eigen.

Member Typedef Documentation

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

Constructor & Destructor Documentation

aligned_allocator ( ) [inline]
aligned_allocator ( const aligned_allocator< T > &  ) [inline]
aligned_allocator ( const aligned_allocator< U > &  ) [inline]
~aligned_allocator ( ) [inline]

Member Function Documentation

pointer address ( reference  value) const [inline]
const_pointer address ( const_reference  value) const [inline]
pointer allocate ( size_type  num,
const void *  hint = 0 
) [inline]
void construct ( pointer  p,
const T &  value 
) [inline]
void deallocate ( pointer  p,
size_type   
) [inline]
void destroy ( pointer  p) [inline]
size_type max_size ( ) const [inline]
bool operator!= ( const aligned_allocator< T > &  ) const [inline]
bool operator== ( const aligned_allocator< T > &  ) const [inline]

The documentation for this class was generated from the following file: