Home | History | Annotate | Download | only in decpp

Lines Matching refs:Alignment

38 template<typename T, deUint32 Alignment>
41 template<typename T, deUint32 Alignment>
51 template<typename T, deUint32 Alignment = (sizeof(T) > 4 ? 4 : (deUint32)sizeof(T))>
55 typedef PoolArrayIterator<T, Alignment> Iterator;
56 typedef PoolArrayConstIterator<T, Alignment> ConstIterator;
59 PoolArray (MemPool* pool, const PoolArray<T, Alignment>& other);
92 PoolArray (const PoolArray<T, Alignment>& other); // \note Default copy ctor is not allowed, use PoolArray(pool, copy) instead.
105 template<typename T, deUint32 Alignment>
118 template<typename T, deUint32 Alignment>
119 class PoolArrayConstIterator : public PoolArrayIteratorBase<T, Alignment>
123 PoolArrayConstIterator (const PoolArray<T, Alignment>* array, deIntptr ndx);
124 PoolArrayConstIterator (const PoolArrayIterator<T, Alignment>& iterator);
129 const PoolArray<T, Alignment>* getArray (void) const throw() { return m_array; }
137 PoolArrayConstIterator<T, Alignment>& operator++ (void) { this->m_ndx += 1; return *this; }
138 PoolArrayConstIterator<T, Alignment>& operator-- (void) { this->m_ndx -= 1; return *this; }
141 PoolArrayConstIterator<T, Alignment> operator++ (int) { PoolArrayConstIterator<T, Alignment> copy(*this); this->m_ndx +=1; return copy; }
142 PoolArrayConstIterator<T, Alignment> operator-- (int) { PoolArrayConstIterator<T, Alignment> copy(*this); this->m_ndx -=1; return copy; }
145 PoolArrayConstIterator<T, Alignment>& operator+= (deIntptr offs) { this->m_ndx += offs; return *this; }
146 PoolArrayConstIterator<T, Alignment>& operator-= (deIntptr offs) { this->m_ndx -= offs; return *this; }
149 PoolArrayConstIterator<T, Alignment>& operator= (const PoolArrayIterator<T, Alignment>& iter);
152 const PoolArray<T, Alignment>* m_array;
155 template<typename T, deUint32 Alignment>
156 class PoolArrayIterator : public PoolArrayIteratorBase<T, Alignment>
160 PoolArrayIterator (PoolArray<T, Alignment>* array, deIntptr ndx);
165 PoolArray<T, Alignment>* getArray (void) const throw() { return m_array; }
173 PoolArrayIterator<T, Alignment>& operator++ (void) { this->m_ndx += 1; return *this; }
174 PoolArrayIterator<T, Alignment>& operator-- (void) { this->m_ndx -= 1; return *this; }
177 PoolArrayIterator<T, Alignment> operator++ (int) { PoolArrayIterator<T, Alignment> copy(*this); this->m_ndx +=1; return copy; }
178 PoolArrayIterator<T, Alignment> operator-- (int) { PoolArrayIterator<T, Alignment> copy(*this); this->m_ndx -=1; return copy; }
181 PoolArrayIterator<T, Alignment>& operator+= (deIntptr offs) { this->m_ndx += offs; return *this; }
182 PoolArrayIterator<T, Alignment>& operator-= (deIntptr offs) { this->m_ndx -= offs; return *this; }
185 PoolArray<T, Alignment>* m_array;
216 template<typename T, deUint32 Alignment>
217 PoolArray<T, Alignment>::PoolArray (MemPool* pool)
224 DE_ASSERT(deIsPowerOfTwo32(Alignment));
227 template<typename T, deUint32 Alignment>
228 PoolArray<T, Alignment>::~PoolArray (void)
234 template<typename T, deUint32 Alignment>
235 inline void PoolArray<T, Alignment>::clear (void)
240 template<typename T, deUint32 Alignment>
241 inline void PoolArray<T, Alignment>::resize (deUintptr newSize)
264 template<typename T, deUint32 Alignment>
265 inline void PoolArray<T, Alignment>::resize (deUintptr newSize, const T& value)
282 template<typename T, deUint32 Alignment>
283 inline void PoolArray<T, Alignment>::reserve (deUintptr capacity)
315 deUintptr elementSize = (deUintptr)deAlignPtr((void*)(deUintptr)sizeof(T), Alignment);
322 void* newPage = deAlignPtr(oldPageTable, Alignment);
326 break; // No free space for alloc + alignment.
340 m_pageTable[pageTableNdx] = m_pool->alignedAlloc(pageAllocSize, Alignment);
349 template<typename T, deUint32 Alignment>
350 inline void PoolArray<T, Alignment>::pushBack (const T& value)
356 template<typename T, deUint32 Alignment>
357 inline T PoolArray<T, Alignment>::popBack (void)
364 template<typename T, deUint32 Alignment>
365 inline T* PoolArray<T, Alignment>::getPtr (deIntptr ndx) const
370 deUintptr elemSize = (deUintptr)deAlignPtr((void*)(deUintptr)sizeof(T), Alignment);
372 DE_ASSERT(deIsAlignedPtr(ptr, Alignment));
378 template<typename T, deUint32 Alignment>
379 inline bool operator== (const PoolArrayIteratorBase<T, Alignment>& a, const PoolArrayIteratorBase<T, Alignment>& b)
385 template<typename T, deUint32 Alignment>
386 inline bool operator!= (const PoolArrayIteratorBase<T, Alignment>& a, const PoolArrayIteratorBase<T, Alignment>& b)
392 template<typename T, deUint32 Alignment>
393 inline bool operator< (const PoolArrayIteratorBase<T, Alignment>& a, const PoolArrayIteratorBase<T, Alignment>& b)
398 template<typename T, deUint32 Alignment>
399 inline bool operator> (const PoolArrayIteratorBase<T, Alignment>& a, const PoolArrayIteratorBase<T, Alignment>& b)
404 template<typename T, deUint32 Alignment>
405 inline bool operator<= (const PoolArrayIteratorBase<T, Alignment>& a, const PoolArrayIteratorBase<T, Alignment>& b)
410 template<typename T, deUint32 Alignment>
411 inline bool operator>= (const PoolArrayIteratorBase<T, Alignment>& a, const PoolArrayIteratorBase<T, Alignment>& b)
418 template<typename T, deUint32 Alignment>
419 inline PoolArrayConstIterator<T, Alignment>::PoolArrayConstIterator (void)
420 : PoolArrayIteratorBase<T, Alignment> (0)
425 template<typename T, deUint32 Alignment>
426 inline PoolArrayConstIterator<T, Alignment>::PoolArrayConstIterator (const PoolArray<T, Alignment>* array, deIntptr ndx)
427 : PoolArrayIteratorBase<T, Alignment> (ndx)
432 template<typename T, deUint32 Alignment>
433 inline PoolArrayConstIterator<T, Alignment>::PoolArrayConstIterator (const PoolArrayIterator<T, Alignment>& iter)
434 : PoolArrayIteratorBase<T, Alignment> (iter)
439 template<typename T, deUint32 Alignment>
440 inline PoolArrayConstIterator<T, Alignment>::~PoolArrayConstIterator (void)
446 template<typename T, deUint32 Alignment>
447 inline PoolArrayConstIterator<T, Alignment> operator+ (const PoolArrayConstIterator<T, Alignment>& iter, deIntptr offs)
449 return PoolArrayConstIterator<T, Alignment>(iter->getArray(), iter->getNdx()+offs);
452 template<typename T, deUint32 Alignment>
453 inline PoolArrayConstIterator<T, Alignment> operator+ (deUintptr offs, const PoolArrayConstIterator<T, Alignment>& iter)
455 return PoolArrayConstIterator<T, Alignment>(iter->getArray(), iter->getNdx()+offs);
458 template<typename T, deUint32 Alignment>
459 PoolArrayConstIterator<T, Alignment> operator- (const PoolArrayConstIterator<T, Alignment>& iter, deIntptr offs)
461 return PoolArrayConstIterator<T, Alignment>(iter.getArray(), iter.getNdx()-offs);
464 template<typename T, deUint32 Alignment>
465 deIntptr operator- (const PoolArrayConstIterator<T, Alignment>& iter, const PoolArrayConstIterator<T, Alignment>& other)
472 template<typename T, deUint32 Alignment>
473 inline PoolArrayIterator<T, Alignment>::PoolArrayIterator (void)
474 : PoolArrayIteratorBase<T, Alignment> (0)
479 template<typename T, deUint32 Alignment>
480 inline PoolArrayIterator<T, AlignmentAlignment>* array, deIntptr ndx)
481 : PoolArrayIteratorBase<T, Alignment> (ndx)
486 template<typename T, deUint32 Alignment>
487 inline PoolArrayIterator<T, Alignment>::~PoolArrayIterator (void)
493 template<typename T, deUint32 Alignment>
494 inline PoolArrayIterator<T, Alignment> operator+ (const PoolArrayIterator<T, Alignment>& iter, deIntptr offs)
496 return PoolArrayIterator<T, Alignment>(iter.getArray(), iter.getNdx()+offs);
499 template<typename T, deUint32 Alignment>
500 inline PoolArrayIterator<T, Alignment> operator+ (deUintptr offs, const PoolArrayIterator<T, Alignment>& iter)
502 return PoolArrayIterator<T, Alignment>(iter.getArray(), iter.getNdx()+offs);
505 template<typename T, deUint32 Alignment>
506 PoolArrayIterator<T, Alignment> operator- (const PoolArrayIterator<T, Alignment>& iter, deIntptr offs)
508 return PoolArrayIterator<T, Alignment>(iter.getArray(), iter.getNdx()-offs);
511 template<typename T, deUint32 Alignment>
512 deIntptr operator- (const PoolArrayIterator<T, Alignment>& iter, const PoolArrayIterator<T, Alignment>& other)
523 template<typename T, deUint32 Alignment>
524 struct iterator_traits<de::PoolArrayConstIterator<T, Alignment> >
533 template<typename T, deUint32 Alignment>
534 struct iterator_traits<de::PoolArrayIterator<T, Alignment> >