27 #ifndef ALIGNED_ALLOCATOR
28 #define ALIGNED_ALLOCATOR
104 return std::numeric_limits<std::size_t>::max() /
sizeof(
T);
112 const size_type size = numElements * elementSize;
125 new((
void*)p)
T(value);
136 template <
class T1,
class T2>
142 template <
class T1,
class T2>
148 #endif // #ifndef ALIGNED_ALLOCATOR
void * rtl_AllocateAligned(size_t size, size_t align)
NOTHROW_DEFINE AlignedAllocator(const AlignedAllocator &)
#define UNUSED(param)
mark a function parameter as unused and avoid the corresponding compiler warning. ...
NOTHROW_DEFINE ~AlignedAllocator()
const x86_x64::Cache * Caches(size_t idxCache)
void construct(pointer p, const T &value)
bool operator==(const FCDJointWeightPair &a, const FCDJointWeightPair &b)
T round_up(T n, T multiple)
round number up/down to the next given multiple.
const T & const_reference
AlignedAllocator< U > other
#define UNUSED2(param)
mark a function local variable or parameter as unused and avoid the corresponding compiler warning...
NOTHROW_DEFINE AlignedAllocator(const AlignedAllocator< U > &)
pointer address(reference value) const
NOTHROW_DEFINE AlignedAllocator()
#define T(string_literal)
NOTHROW_DEFINE size_type max_size() const
stateless STL allocator that aligns elements to the L1 cache line size.
const_pointer address(const_reference value) const
NOTHROW_DEFINE bool operator!=(const AlignedAllocator< T1 > &, const AlignedAllocator< T2 > &)
pointer allocate(size_type numElements)
void rtl_FreeAligned(void *alignedPointer)
void deallocate(pointer p, size_type num)
size_t entrySize
NB: cache entries are lines, TLB entries are pages.
std::ptrdiff_t difference_type