68 if( posix_memalign(&p_ptr_alloc,
CD_ALIGN, sz) != 0 )
70 p_ptr.push_back(p_ptr_alloc);
83 for(
size_t i=0; i <
p_ptr.size(); ++i )
88 void* p_ptr_alloc =
NULL;
89 for(
size_t i=0; i <
p_ptr.size(); i++ )
93 p_ptr_alloc =
p_ptr[i];
98 if( p_ptr_alloc ==
NULL )
101 p_ptr_alloc =
p_ptr.back();
108 for( i=0; i <
p_ptr.size(); i++ )
110 if(
p_ptr[i] == p_ptr_alloc )
150 template<
class T,
bool lgBC=lgBOUNDSCHECKVAL>
168 size_t sz = size_t(
max(end-begin,0)*
sizeof(T));
203 if( lgBC && ( i < p_begin || i >=
p_end ) )
209 if( lgBC && ( i < p_begin || i >=
p_end ) )
295 if( posix_memalign(&p,
CD_ALIGN, n*
sizeof(T)) != 0 )
306 template<
class T,
class U>
318 template<
class T,
class U>
T * p_ptr
Definition: vectorize.h:156
t_avx_pool()
Definition: vectorize.h:76
T & reference
Definition: vectorize.h:271
static const size_t p_min_size
Definition: vectorize.h:63
Definition: vectorize.h:245
Definition: vectorize.h:151
const T * const_pointer
Definition: vectorize.h:270
T * ptr0()
Definition: vectorize.h:221
~allocator_avx()
Definition: vectorize.h:290
void avx_free(void *p_ptr_alloc)
Definition: vectorize.h:105
ptrdiff_t difference_type
Definition: vectorize.h:268
allocator_avx< U > other
Definition: vectorize.h:258
allocator_avx(const allocator_avx< U > &)
Definition: vectorize.h:288
long p_end
Definition: vectorize.h:154
vector< size_t > p_size
Definition: vectorize.h:57
void * pointer
Definition: vectorize.h:253
avx_ptr(long size)
Definition: vectorize.h:188
void p_alloc(size_t sz, bool lgUsed)
Definition: vectorize.h:65
ptrdiff_t difference_type
Definition: vectorize.h:252
const T * ptr0() const
Definition: vectorize.h:225
NORETURN void OUT_OF_RANGE(const char *str)
Definition: cddefines.h:646
void * avx_alloc(size_t sz)
Definition: vectorize.h:86
allocator_avx< U > other
Definition: vectorize.h:278
true_type propagate_on_container_move_assignment
Definition: vectorize.h:281
void deallocate(pointer p, size_type)
Definition: vectorize.h:300
true_type propagate_on_container_move_assignment
Definition: vectorize.h:260
typename std::vector< T, allocator_avx< T >> vector_avx
Definition: vectorize.h:331
bool operator!=(const allocator_avx< T > &, const allocator_avx< U > &)
Definition: vectorize.h:319
bool operator==(const allocator_avx< T > &, const allocator_avx< U > &)
Definition: vectorize.h:307
avx_ptr()
Definition: vectorize.h:159
reference operator[](long i)
Definition: vectorize.h:201
T * data()
Definition: vectorize.h:213
long max(int a, long b)
Definition: cddefines.h:821
allocator_avx()
Definition: vectorize.h:283
#define NULL
Definition: cddefines.h:115
~avx_ptr()
Definition: vectorize.h:196
void p_alloc(long begin, long end)
Definition: vectorize.h:166
size_t size_type
Definition: vectorize.h:251
void posix_memalign_free(void *p)
Definition: cpu.h:143
const T & const_reference
Definition: vectorize.h:186
~t_avx_pool()
Definition: vectorize.h:81
t_avx_pool avx_pool
Definition: vectorize.cpp:7
const void * const_pointer
Definition: vectorize.h:254
Definition: vectorize.h:276
avx_ptr(long begin, long end)
Definition: vectorize.h:192
allocator_avx(const allocator_avx &a)
Definition: vectorize.h:285
T * pointer
Definition: vectorize.h:269
const T & const_reference
Definition: vectorize.h:272
pointer allocate(size_type n, typename allocator_avx< void >::const_pointer=NULL)
Definition: vectorize.h:292
T & reference
Definition: vectorize.h:185
const T * data() const
Definition: vectorize.h:217
Definition: vectorize.h:54
#define CD_ALIGN
Definition: cpu.h:127
vector< void * > p_ptr
Definition: vectorize.h:56
size_t size_type
Definition: vectorize.h:267
long p_begin
Definition: vectorize.h:153
vector< bool > p_used
Definition: vectorize.h:58
static const size_t p_def_size
Definition: vectorize.h:62
T value_type
Definition: vectorize.h:273
T * p_ptr_alloc
Definition: vectorize.h:155
void value_type
Definition: vectorize.h:255