Go to the documentation of this file.
54 std::cerr <<
"Allocator: allocate " << num <<
" element(s)"
55 <<
" of size " <<
sizeof(T) << std::endl;
58 reinterpret_cast<pointer>(
operator new(num *
sizeof(T)));
60 std::cerr <<
" allocated at: " << (
void*) ret << std::endl;
69 std::cerr <<
"Allocator: construct "
76 std::cerr <<
"done." << std::endl;
84 std::cerr <<
"Allocator: destroy " << p << std::endl;
88 std::cerr <<
"done." << std::endl;
96 std::cerr <<
"Allocator: deallocate " << num <<
" element(s)"
97 <<
" of size " <<
sizeof(T) <<
" at: " <<
static_cast<void*
>(p)
100 operator delete(
static_cast<void*
>(p), num *
sizeof(T));
102 std::cerr <<
"done." << std::endl;
107 void*
operator new(
size_t size,
void* ptr) {
108 return ::operator
new(size, ptr);
110 void*
operator new[](
size_t size,
void* ptr) {
111 return ::operator
new(size, ptr);
113 void*
operator new(
size_t size) {
return _mm_malloc(size, 16); }
114 void*
operator new[](
size_t size) {
return _mm_malloc(size, 16); }
115 void operator delete(
void* ptr, size_t) {
_mm_free(ptr); }
116 void operator delete[](
void* ptr, size_t) {
_mm_free(ptr); }
120 template<
class T1,
class T2>
124 template<
class T1,
class T2>
136 typedef std::vector<T, SimdAlloc<T>>
TSimd;
bool operator==(const SimdAlloc< T1 > &, const SimdAlloc< T2 > &)
pointer allocate(size_type num, const void *=0)
SimdAlloc(const SimdAlloc &)
void construct(pointer p, const T &value)
const T & const_reference
SimdAlloc(const SimdAlloc< U > &)
std::ptrdiff_t difference_type
void deallocate(pointer p, size_type num)
pointer address(reference value) const
nsL1::vector< fvec >::TSimd vector_fvec
bool operator!=(const SimdAlloc< T1 > &, const SimdAlloc< T2 > &)
size_type max_size() const
const_pointer address(const_reference value) const
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)
std::vector< T, SimdAlloc< T > > TSimd