vSMC
vSMC: Scalable Monte Carlo
Classes | Namespaces | Macros | Typedefs
aligned_memory.hpp File Reference
#include <vsmc/internal/common.hpp>
#include <stdlib.h>
#include <tbb/scalable_allocator.h>
#include <mkl_service.h>

Go to the source code of this file.

Classes

class  vsmc::AlignedAllocator< T, Alignment, Memory >
 Aligned allocator. More...
 
struct  vsmc::AlignedAllocator< T, Alignment, Memory >::rebind< U >
 
class  vsmc::AlignedMemoryMKL
 Aligned memory using Intel MKL mkl_malloc and mkl_free More...
 
class  vsmc::AlignedMemorySTD
 Aligned memory using std::malloc and std::free More...
 
class  vsmc::AlignedMemorySYS
 Aligned memory using native system aligned memory allocation. More...
 
class  vsmc::AlignedMemoryTBB
 Aligned memory using Intel TBB scalable_aligned_malloc and scalable_aligned_free. More...
 

Namespaces

 vsmc
 

Macros

#define VSMC_ALIGNED_MEMORY_TYPE   ::vsmc::AlignedMemorySYS
 Default AlignedMemory type. More...
 
#define VSMC_RUNTIME_ASSERT_UTILITY_ALIGNED_MEMORY
 
#define VSMC_RUNTIME_ASSERT_UTILITY_ALIGNED_MEMORY_POWER_OF_TWO(alignment)
 
#define VSMC_RUNTIME_ASSERT_UTILITY_ALIGNED_MEMORY_SIZEOF_VOID(alignemnt)
 
#define VSMC_STATIC_ASSERT_UTILITY_ALIGNED_MEMORY
 
#define VSMC_STATIC_ASSERT_UTILITY_ALIGNED_MEMORY_POWER_OF_TWO(Alignment)
 
#define VSMC_STATIC_ASSERT_UTILITY_ALIGNED_MEMORY_SIZEOF_VOID(Alignemnt)
 

Typedefs

typedef ::vsmc::AlignedMemorySYS vsmc::AlignedMemory
 Default AlignedMemory type. More...
 

Macro Definition Documentation

#define VSMC_RUNTIME_ASSERT_UTILITY_ALIGNED_MEMORY
Value:
#define VSMC_RUNTIME_ASSERT_UTILITY_ALIGNED_MEMORY_SIZEOF_VOID(alignemnt)
#define VSMC_RUNTIME_ASSERT_UTILITY_ALIGNED_MEMORY_POWER_OF_TWO(alignment)

Definition at line 85 of file aligned_memory.hpp.

#define VSMC_RUNTIME_ASSERT_UTILITY_ALIGNED_MEMORY_POWER_OF_TWO (   alignment)
Value:
VSMC_RUNTIME_ASSERT((alignment != 0 && (alignment & (alignment - 1)) == 0),\
"**aligned_malloc** USED WITH ALIGNMENT NOT A POWER OF TWO")
#define VSMC_RUNTIME_ASSERT(cond, msg)
Definition: assert.hpp:64

Definition at line 77 of file aligned_memory.hpp.

#define VSMC_RUNTIME_ASSERT_UTILITY_ALIGNED_MEMORY_SIZEOF_VOID (   alignemnt)
Value:
VSMC_RUNTIME_ASSERT((alignment >= sizeof(void *)), \
"**aligned_malloc** USED WITH ALIGNMENT LESS THAN sizeof(void *)")
#define VSMC_RUNTIME_ASSERT(cond, msg)
Definition: assert.hpp:64

Definition at line 81 of file aligned_memory.hpp.

#define VSMC_STATIC_ASSERT_UTILITY_ALIGNED_MEMORY
Value:
#define VSMC_STATIC_ASSERT_UTILITY_ALIGNED_MEMORY_POWER_OF_TWO(Alignment)
#define VSMC_STATIC_ASSERT_UTILITY_ALIGNED_MEMORY_SIZEOF_VOID(Alignemnt)

Definition at line 73 of file aligned_memory.hpp.

#define VSMC_STATIC_ASSERT_UTILITY_ALIGNED_MEMORY_POWER_OF_TWO (   Alignment)
Value:
VSMC_STATIC_ASSERT((Alignment != 0 && (Alignment & (Alignment - 1)) == 0),\
USE_AlignedAllocator_WITH_ALIGNEMNT_NOT_A_POWER_OF_TWO)
#define VSMC_STATIC_ASSERT(cond, msg)
Definition: assert.hpp:46

Definition at line 65 of file aligned_memory.hpp.

#define VSMC_STATIC_ASSERT_UTILITY_ALIGNED_MEMORY_SIZEOF_VOID (   Alignemnt)
Value:
VSMC_STATIC_ASSERT((Alignment >= sizeof(void *)), \
USE_AlignedAllocator_WITH_ALIGNMENT_LESS_THAN_SIZEOF_VOID_POINTER)
#define VSMC_STATIC_ASSERT(cond, msg)
Definition: assert.hpp:46

Definition at line 69 of file aligned_memory.hpp.