Go to the source code of this file.
|
template<class T , size_t ALIGN = QMC_SIMD_ALIGNMENT> |
using | aligned_allocator = Mallocator< T, ALIGN > |
|
template<class T > |
using | aligned_vector = std::vector< T, aligned_allocator< T > > |
|
|
template<typename T , size_t ALIGN = QMC_SIMD_ALIGNMENT> |
size_t | getAlignedSize (size_t n) |
| return size in T's of allocated aligned memory More...
|
|
template<typename T , size_t ALIGN = QMC_SIMD_ALIGNMENT> |
size_t | getAlignment () |
|
◆ ASSUME_ALIGNED
#define ASSUME_ALIGNED |
( |
|
x | ) |
|
◆ getAlignedSize()
size_t getAlignedSize |
( |
size_t |
n | ) |
|
|
inline |
return size in T's of allocated aligned memory
Definition at line 42 of file aligned_allocator.hpp.
References qmcplusplus::n.
44 constexpr
size_t ND = ALIGN /
sizeof(T);
45 static_assert(ALIGN %
sizeof(T) == 0,
"getAlignedSize ALIGN must be a multiple of sizeof(T)");
46 return ((
n + ND - 1) / ND) * ND;
◆ getAlignment()
Definition at line 50 of file aligned_allocator.hpp.
52 static_assert(ALIGN %
sizeof(T) == 0,
"getAlignedSize ALIGN must be a multiple of sizeof(T)");
53 return ALIGN /
sizeof(T);