Memory.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  aligned_allocator< T >
 stl compatible allocator to use with with 16 byte aligned types More...
struct  aligned_allocator< T >::rebind< U >

Defines

#define ei_aligned_stack_alloc(SIZE)   ei_aligned_malloc(SIZE)
#define ei_aligned_stack_delete(TYPE, PTR, SIZE)
#define ei_aligned_stack_free(PTR, SIZE)   ei_aligned_free(PTR)
#define ei_aligned_stack_new(TYPE, SIZE)   ei_construct_elements_of_array(reinterpret_cast<TYPE*>(ei_aligned_stack_alloc(sizeof(TYPE)*SIZE)), SIZE)
#define EIGEN_FREEBSD_MALLOC_ALREADY_ALIGNED   0
#define EIGEN_HAS_MM_MALLOC   0
#define EIGEN_HAS_POSIX_MEMALIGN   0
#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW   EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(true)
#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)
#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar, Size)   EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(((Size)!=Eigen::Dynamic) && ((sizeof(Scalar)*(Size))%16==0))
#define EIGEN_MALLOC_ALREADY_ALIGNED   0

Functions

template<typename T >
void ei_aligned_delete (T *ptr, std::size_t size)
void ei_aligned_free (void *ptr)
void * ei_aligned_malloc (std::size_t size)
template<typename T >
T * ei_aligned_new (std::size_t size)
template<typename Scalar , typename Integer >
static Integer ei_alignmentOffset (const Scalar *array, Integer size)
template<typename T , bool Align>
void ei_conditional_aligned_delete (T *ptr, std::size_t size)
template<bool Align>
void ei_conditional_aligned_free (void *ptr)
template<>
void ei_conditional_aligned_free< false > (void *ptr)
template<bool Align>
void * ei_conditional_aligned_malloc (std::size_t size)
template<>
void * ei_conditional_aligned_malloc< false > (std::size_t size)
template<typename T , bool Align>
T * ei_conditional_aligned_new (std::size_t size)
template<typename T >
T * ei_construct_elements_of_array (T *ptr, std::size_t size)
template<typename T >
void ei_destruct_elements_of_array (T *ptr, std::size_t size)
void ei_handmade_aligned_free (void *ptr)
void * ei_handmade_aligned_malloc (std::size_t size)

Define Documentation

#define ei_aligned_stack_alloc ( SIZE   )     ei_aligned_malloc(SIZE)

Definition at line 273 of file Memory.h.

#define ei_aligned_stack_delete ( TYPE,
PTR,
SIZE   ) 
Value:
do {ei_destruct_elements_of_array<TYPE>(PTR, SIZE); \
                                                   ei_aligned_stack_free(PTR,sizeof(TYPE)*SIZE);} while(0)

Definition at line 278 of file Memory.h.

#define ei_aligned_stack_free ( PTR,
SIZE   )     ei_aligned_free(PTR)

Definition at line 274 of file Memory.h.

#define ei_aligned_stack_new ( TYPE,
SIZE   )     ei_construct_elements_of_array(reinterpret_cast<TYPE*>(ei_aligned_stack_alloc(sizeof(TYPE)*SIZE)), SIZE)

Definition at line 277 of file Memory.h.

#define EIGEN_FREEBSD_MALLOC_ALREADY_ALIGNED   0

Definition at line 37 of file Memory.h.

#define EIGEN_HAS_MM_MALLOC   0

Definition at line 55 of file Memory.h.

#define EIGEN_HAS_POSIX_MEMALIGN   0

Definition at line 49 of file Memory.h.

#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW   EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(true)

Definition at line 321 of file Memory.h.

#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF ( NeedsToAlign   ) 

Definition at line 318 of file Memory.h.

#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE ( Scalar,
Size   )     EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(((Size)!=Eigen::Dynamic) && ((sizeof(Scalar)*(Size))%16==0))

Definition at line 322 of file Memory.h.

#define EIGEN_MALLOC_ALREADY_ALIGNED   0

Definition at line 43 of file Memory.h.


Function Documentation

template<typename T >
void ei_aligned_delete ( T *  ptr,
std::size_t  size 
) [inline]

Definition at line 198 of file Memory.h.

void ei_aligned_free ( void *  ptr  )  [inline]

Definition at line 156 of file Memory.h.

void* ei_aligned_malloc ( std::size_t  size  )  [inline]

Definition at line 80 of file Memory.h.

template<typename T >
T* ei_aligned_new ( std::size_t  size  )  [inline]

allocates size objects of type T. The returned pointer is guaranteed to have 16 bytes alignment. On allocation error, the returned pointer is undefined, but if exceptions are enabled then a std::bad_alloc is thrown. The default constructor of T is called.

Definition at line 142 of file Memory.h.

template<typename Scalar , typename Integer >
static Integer ei_alignmentOffset ( const Scalar *  array,
Integer  size 
) [inline, static]

Definition at line 230 of file Memory.h.

template<typename T , bool Align>
void ei_conditional_aligned_delete ( T *  ptr,
std::size_t  size 
) [inline]

Definition at line 207 of file Memory.h.

template<bool Align>
void ei_conditional_aligned_free ( void *  ptr  )  [inline]

Definition at line 175 of file Memory.h.

template<>
void ei_conditional_aligned_free< false > ( void *  ptr  )  [inline]
template<bool Align>
void* ei_conditional_aligned_malloc ( std::size_t  size  )  [inline]

allocates size bytes. If Align is true, then the returned ptr is 16-byte-aligned. On allocation error, the returned pointer is null, and if exceptions are enabled then a std::bad_alloc is thrown.

Definition at line 111 of file Memory.h.

template<>
void* ei_conditional_aligned_malloc< false > ( std::size_t  size  )  [inline]
template<typename T , bool Align>
T* ei_conditional_aligned_new ( std::size_t  size  )  [inline]

Definition at line 148 of file Memory.h.

template<typename T >
T* ei_construct_elements_of_array ( T *  ptr,
std::size_t  size 
) [inline]

Definition at line 132 of file Memory.h.

template<typename T >
void ei_destruct_elements_of_array ( T *  ptr,
std::size_t  size 
) [inline]

Definition at line 188 of file Memory.h.

void ei_handmade_aligned_free ( void *  ptr  )  [inline]

Definition at line 71 of file Memory.h.

void* ei_handmade_aligned_malloc ( std::size_t  size  )  [inline]

Definition at line 62 of file Memory.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


vcglib
Author(s): Christian Bersch
autogenerated on Fri Jan 11 09:20:04 2013