Go to the documentation of this file. 1 #ifndef MiscLib__ALIGNEDALLOCATOR_HEADER__
2 #define MiscLib__ALIGNEDALLOCATOR_HEADER__
16 template<
class T,
unsigned int Align = DefaultAlignment >
47 return (
T*)_mm_malloc(
s *
sizeof(
T), Align);
59 new (
static_cast< void*
>(p))
T(val);
87 template<
unsigned int Align = sizeof(
size_t) >
const_pointer address(const_reference x) const
bool operator!=(const AlignedAllocator< U, Align > &) const
pointer allocate(size_type s, std::allocator_traits< std::allocator< void >>::const_void_pointer hint=0)
pointer address(reference x) const
size_type max_size() const
void construct(pointer p, const T &val)
void deallocate(pointer p, size_type)
AlignedAllocator< U, Align > other
bool operator==(const AlignedAllocator< U, Align > &) const
AlignedAllocator(const AlignedAllocator< U, Align > &)
const typedef T * const_pointer
bool operator!=(const U &) const
AlignedAllocator(const AlignedAllocator< T, Align > &)
const typedef T & const_reference
double s(double t, double s0, double v0, double a0, double j)
bool operator==(const U &) const
ptrdiff_t difference_type