compbio
Classes | Public Types | Public Member Functions | List of all members
Eigen::aligned_allocator< T > Class Template Reference

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

#include <Memory.h>

Inheritance diagram for Eigen::aligned_allocator< T >:

Classes

struct  rebind
 

Public Types

typedef size_t size_type
 
typedef std::ptrdiff_t difference_type
 
typedef Tpointer
 
typedef const Tconst_pointer
 
typedef Treference
 
typedef const Tconst_reference
 
typedef T value_type
 

Public Member Functions

 aligned_allocator (const aligned_allocator &other)
 
template<class U >
 aligned_allocator (const aligned_allocator< U > &other)
 
pointer allocate (size_type num, const void *=0)
 
void deallocate (pointer p, size_type)
 

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
TopicStlContainers.

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