MOAB  4.9.3pre
Memory.h File Reference

Go to the source code of this file.

Classes

struct  Eigen::internal::smart_copy_helper< T, true >
struct  Eigen::internal::smart_copy_helper< T, false >
struct  Eigen::internal::smart_memmove_helper< T, true >
struct  Eigen::internal::smart_memmove_helper< T, false >
class  Eigen::internal::aligned_stack_memory_handler< T >
class  Eigen::internal::scoped_array< T >
class  Eigen::aligned_allocator< T >
 STL compatible allocator to use with with 16 byte aligned types. More...
struct  Eigen::aligned_allocator< T >::rebind< U >

Namespaces

namespace  Eigen
namespace  Eigen::internal

Defines

#define EIGEN_GLIBC_MALLOC_ALREADY_ALIGNED   0
#define EIGEN_FREEBSD_MALLOC_ALREADY_ALIGNED   0
#define EIGEN_MALLOC_ALREADY_ALIGNED   0
#define ei_declare_aligned_stack_constructed_variable(TYPE, NAME, SIZE, BUFFER)
#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)
#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW   EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(true)
#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar, Size)   EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(bool(((Size)!=Eigen::Dynamic) && ((sizeof(Scalar)*(Size))%EIGEN_MAX_ALIGN_BYTES==0)))

Functions

EIGEN_DEVICE_FUNC void Eigen::internal::throw_std_bad_alloc ()
void * Eigen::internal::handmade_aligned_malloc (std::size_t size)
void Eigen::internal::handmade_aligned_free (void *ptr)
void * Eigen::internal::handmade_aligned_realloc (void *ptr, std::size_t size, std::size_t=0)
 Reallocates aligned memory. Since we know that our handmade version is based on std::malloc we can use std::realloc to implement efficient reallocation.
EIGEN_DEVICE_FUNC void Eigen::internal::check_that_malloc_is_allowed ()
EIGEN_DEVICE_FUNC void * Eigen::internal::aligned_malloc (size_t size)
EIGEN_DEVICE_FUNC void Eigen::internal::aligned_free (void *ptr)
void * Eigen::internal::aligned_realloc (void *ptr, size_t new_size, size_t old_size)
 Reallocates an aligned block of memory.
template<bool Align>
EIGEN_DEVICE_FUNC void * Eigen::internal::conditional_aligned_malloc (size_t size)
template<>
EIGEN_DEVICE_FUNC void * Eigen::internal::conditional_aligned_malloc< false > (size_t size)
template<bool Align>
EIGEN_DEVICE_FUNC void Eigen::internal::conditional_aligned_free (void *ptr)
template<>
EIGEN_DEVICE_FUNC void Eigen::internal::conditional_aligned_free< false > (void *ptr)
template<bool Align>
void * Eigen::internal::conditional_aligned_realloc (void *ptr, size_t new_size, size_t old_size)
template<>
void * Eigen::internal::conditional_aligned_realloc< false > (void *ptr, size_t new_size, size_t)
template<typename T >
EIGEN_DEVICE_FUNC void Eigen::internal::destruct_elements_of_array (T *ptr, size_t size)
template<typename T >
EIGEN_DEVICE_FUNC TEigen::internal::construct_elements_of_array (T *ptr, size_t size)
template<typename T >
EIGEN_DEVICE_FUNC
EIGEN_ALWAYS_INLINE void 
Eigen::internal::check_size_for_overflow (size_t size)
template<typename T >
EIGEN_DEVICE_FUNC TEigen::internal::aligned_new (size_t size)
template<typename T , bool Align>
EIGEN_DEVICE_FUNC TEigen::internal::conditional_aligned_new (size_t size)
template<typename T >
EIGEN_DEVICE_FUNC void Eigen::internal::aligned_delete (T *ptr, size_t size)
template<typename T , bool Align>
EIGEN_DEVICE_FUNC void Eigen::internal::conditional_aligned_delete (T *ptr, size_t size)
template<typename T , bool Align>
EIGEN_DEVICE_FUNC TEigen::internal::conditional_aligned_realloc_new (T *pts, size_t new_size, size_t old_size)
template<typename T , bool Align>
EIGEN_DEVICE_FUNC TEigen::internal::conditional_aligned_new_auto (size_t size)
template<typename T , bool Align>
TEigen::internal::conditional_aligned_realloc_new_auto (T *pts, size_t new_size, size_t old_size)
template<typename T , bool Align>
EIGEN_DEVICE_FUNC void Eigen::internal::conditional_aligned_delete_auto (T *ptr, size_t size)
template<int Alignment, typename Scalar , typename Index >
EIGEN_DEVICE_FUNC Index Eigen::internal::first_aligned (const Scalar *array, Index size)
template<typename Scalar , typename Index >
EIGEN_DEVICE_FUNC Index Eigen::internal::first_default_aligned (const Scalar *array, Index size)
template<typename Index >
Index Eigen::internal::first_multiple (Index size, Index base)
template<typename T >
EIGEN_DEVICE_FUNC void Eigen::internal::smart_copy (const T *start, const T *end, T *target)
template<typename T >
void Eigen::internal::smart_memmove (const T *start, const T *end, T *target)
template<typename T >
void Eigen::internal::swap (scoped_array< T > &a, scoped_array< T > &b)
void Eigen::internal::queryCacheSizes (int &l1, int &l2, int &l3)
int Eigen::internal::queryL1CacheSize ()
int Eigen::internal::queryTopLevelCacheSize ()

Define Documentation

#define ei_declare_aligned_stack_constructed_variable (   TYPE,
  NAME,
  SIZE,
  BUFFER 
)
Value:
Eigen::internal::check_size_for_overflow<TYPE>(SIZE); \
    TYPE* NAME = (BUFFER)!=0 ? BUFFER : reinterpret_cast<TYPE*>(Eigen::internal::aligned_malloc(sizeof(TYPE)*SIZE));    \
    Eigen::internal::aligned_stack_memory_handler<TYPE> EIGEN_CAT(NAME,_stack_memory_destructor)((BUFFER)==0 ? NAME : 0,SIZE,true)

Declares, allocates and construct an aligned buffer named NAME of SIZE elements of type TYPE on the stack if SIZE is smaller than EIGEN_STACK_ALLOCATION_LIMIT, and if stack allocation is supported by the platform (currently, this is Linux and Visual Studio only). Otherwise the memory is allocated on the heap. The allocated buffer is automatically deleted when exiting the scope of this declaration. If BUFFER is non null, then the declared variable is simply an alias for BUFFER, and no allocation/deletion occurs. Here is an example:

 {
   ei_declare_aligned_stack_constructed_variable(float,data,size,0);
   // use data[0] to data[size-1]
 }

The underlying stack allocation function can controlled with the EIGEN_ALLOCA preprocessor token.

Definition at line 641 of file Memory.h.

Definition at line 48 of file Memory.h.

Definition at line 38 of file Memory.h.

Definition at line 687 of file Memory.h.

#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF (   NeedsToAlign)

Definition at line 684 of file Memory.h.

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

Definition at line 688 of file Memory.h.

Definition at line 57 of file Memory.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines