|
MOAB
4.9.3pre
|
STL compatible allocator to use with with 16 byte aligned types. More...
#include <Memory.h>
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 | |
| aligned_allocator () | |
| aligned_allocator (const aligned_allocator &other) | |
| template<class U > | |
| aligned_allocator (const aligned_allocator< U > &other) | |
| ~aligned_allocator () | |
| pointer | allocate (size_type num, const void *=0) |
| void | deallocate (pointer p, size_type) |
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;
| typedef const T* Eigen::aligned_allocator< T >::const_pointer |
| typedef const T& Eigen::aligned_allocator< T >::const_reference |
| typedef std::ptrdiff_t Eigen::aligned_allocator< T >::difference_type |
| typedef T* Eigen::aligned_allocator< T >::pointer |
| typedef T& Eigen::aligned_allocator< T >::reference |
| typedef size_t Eigen::aligned_allocator< T >::size_type |
| typedef T Eigen::aligned_allocator< T >::value_type |
| Eigen::aligned_allocator< T >::aligned_allocator | ( | ) | [inline] |
| Eigen::aligned_allocator< T >::aligned_allocator | ( | const aligned_allocator< T > & | other | ) | [inline] |
| Eigen::aligned_allocator< T >::aligned_allocator | ( | const aligned_allocator< U > & | other | ) | [inline] |
| Eigen::aligned_allocator< T >::~aligned_allocator | ( | ) | [inline] |
| pointer Eigen::aligned_allocator< T >::allocate | ( | size_type | num, |
| const void * | = 0 |
||
| ) | [inline] |
Definition at line 736 of file Memory.h.
{
internal::check_size_for_overflow<T>(num);
return static_cast<pointer>( internal::aligned_malloc(num * sizeof(T)) );
}
| void Eigen::aligned_allocator< T >::deallocate | ( | pointer | p, |
| size_type | |||
| ) | [inline] |
Definition at line 742 of file Memory.h.
{
internal::aligned_free(p);
}