Main MRPT website > C++ reference
MRPT logo
Classes | Public Types | Public Member Functions

aligned_allocator< T > Class Template Reference


Detailed Description

template<class T>
class 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.

Definition at line 521 of file Memory.h.

#include <src/Core/util/Memory.h>

List of all members.

Classes

struct  rebind

Public Types

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

Public Member Functions

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

Member Typedef Documentation

template<class T>
typedef const T* aligned_allocator< T >::const_pointer

Definition at line 527 of file Memory.h.

template<class T>
typedef const T& aligned_allocator< T >::const_reference

Definition at line 529 of file Memory.h.

template<class T>
typedef std::ptrdiff_t aligned_allocator< T >::difference_type

Definition at line 525 of file Memory.h.

template<class T>
typedef T* aligned_allocator< T >::pointer

Definition at line 526 of file Memory.h.

template<class T>
typedef T& aligned_allocator< T >::reference

Definition at line 528 of file Memory.h.

template<class T>
typedef size_t aligned_allocator< T >::size_type

Definition at line 524 of file Memory.h.

template<class T>
typedef T aligned_allocator< T >::value_type

Definition at line 530 of file Memory.h.


Constructor & Destructor Documentation

template<class T>
aligned_allocator< T >::aligned_allocator ( ) throw () [inline]

Definition at line 548 of file Memory.h.

template<class T>
aligned_allocator< T >::aligned_allocator ( const aligned_allocator< T > &  ) throw () [inline]

Definition at line 552 of file Memory.h.

template<class T>
template<class U >
aligned_allocator< T >::aligned_allocator ( const aligned_allocator< U > &  ) throw () [inline]

Definition at line 557 of file Memory.h.

template<class T>
aligned_allocator< T >::~aligned_allocator ( ) throw () [inline]

Definition at line 561 of file Memory.h.


Member Function Documentation

template<class T>
pointer aligned_allocator< T >::address ( reference  value) const [inline]

Definition at line 538 of file Memory.h.

template<class T>
const_pointer aligned_allocator< T >::address ( const_reference  value) const [inline]

Definition at line 543 of file Memory.h.

template<class T>
pointer aligned_allocator< T >::allocate ( size_type  num,
const_pointer hint = 0 
) [inline]

Definition at line 570 of file Memory.h.

References mrpt::system::os::aligned_malloc().

template<class T>
void aligned_allocator< T >::construct ( pointer  p,
const T &  value 
) [inline]

Definition at line 576 of file Memory.h.

template<class T>
void aligned_allocator< T >::deallocate ( pointer  p,
size_type   
) [inline]

Definition at line 586 of file Memory.h.

References mrpt::system::os::aligned_free().

template<class T>
void aligned_allocator< T >::destroy ( pointer  p) [inline]

Definition at line 581 of file Memory.h.

template<class T>
size_type aligned_allocator< T >::max_size ( ) const throw () [inline]

Definition at line 565 of file Memory.h.

template<class T>
bool aligned_allocator< T >::operator!= ( const aligned_allocator< T > &  ) const [inline]

Definition at line 591 of file Memory.h.

template<class T>
bool aligned_allocator< T >::operator== ( const aligned_allocator< T > &  ) const [inline]

Definition at line 594 of file Memory.h.




Page generated by Doxygen 1.7.3 for MRPT 0.9.4 SVN: at Sat Mar 26 06:40:17 UTC 2011