#include <btAlignedObjectArray.h>
Classes | |
class | less |
Public Member Functions | |
SIMD_FORCE_INLINE const T & | at (int n) const |
SIMD_FORCE_INLINE T & | at (int n) |
btAlignedObjectArray () | |
btAlignedObjectArray (const btAlignedObjectArray &otherArray) | |
Generally it is best to avoid using the copy constructor of an btAlignedObjectArray, and use a (const) reference to the array instead. | |
SIMD_FORCE_INLINE int | capacity () const |
return the pre-allocated (reserved) elements, this is at least as large as the total number of elements,see size() and reserve() | |
SIMD_FORCE_INLINE void | clear () |
clear the array, deallocated memory. Generally it is better to use array.resize(0), to reduce performance overhead of run-time memory (de)allocations. | |
void | copyFromArray (const btAlignedObjectArray &otherArray) |
template<typename L > | |
void | downHeap (T *pArr, int k, int n, L CompareFunc) |
heap sort from http://www.csse.monash.edu.au/~lloyd/tildeAlgDS/Sort/Heap/ | |
SIMD_FORCE_INLINE T & | expand (const T &fillValue=T()) |
SIMD_FORCE_INLINE T & | expandNonInitializing () |
int | findBinarySearch (const T &key) const |
non-recursive binary search, assumes sorted array | |
int | findLinearSearch (const T &key) const |
template<typename L > | |
void | heapSort (L CompareFunc) |
void | initializeFromBuffer (void *buffer, int size, int capacity) |
SIMD_FORCE_INLINE const T & | operator[] (int n) const |
SIMD_FORCE_INLINE T & | operator[] (int n) |
SIMD_FORCE_INLINE void | pop_back () |
SIMD_FORCE_INLINE void | push_back (const T &_Val) |
template<typename L > | |
void | quickSort (L CompareFunc) |
template<typename L > | |
void | quickSortInternal (L CompareFunc, int lo, int hi) |
void | remove (const T &key) |
SIMD_FORCE_INLINE void | reserve (int _Count) |
SIMD_FORCE_INLINE void | resize (int newsize, const T &fillData=T()) |
SIMD_FORCE_INLINE int | size () const |
return the number of elements in the array | |
void | swap (int index0, int index1) |
~btAlignedObjectArray () | |
Protected Member Functions | |
SIMD_FORCE_INLINE void * | allocate (int size) |
SIMD_FORCE_INLINE int | allocSize (int size) |
SIMD_FORCE_INLINE void | copy (int start, int end, T *dest) const |
SIMD_FORCE_INLINE void | deallocate () |
SIMD_FORCE_INLINE void | destroy (int first, int last) |
SIMD_FORCE_INLINE void | init () |
Private Attributes | |
btAlignedAllocator< T, 16 > | m_allocator |
int | m_capacity |
T * | m_data |
bool | m_ownsMemory |
int | m_size |
The btAlignedObjectArray template class uses a subset of the stl::vector interface for its methods It is developed to replace stl::vector to avoid portability issues, including STL alignment issues to add SIMD/SSE data
Definition at line 46 of file btAlignedObjectArray.h.
btAlignedObjectArray< T >::btAlignedObjectArray | ( | ) | [inline] |
Definition at line 113 of file btAlignedObjectArray.h.
btAlignedObjectArray< T >::~btAlignedObjectArray | ( | ) | [inline] |
Definition at line 118 of file btAlignedObjectArray.h.
btAlignedObjectArray< T >::btAlignedObjectArray | ( | const btAlignedObjectArray< T > & | otherArray | ) | [inline] |
Generally it is best to avoid using the copy constructor of an btAlignedObjectArray, and use a (const) reference to the array instead.
Definition at line 124 of file btAlignedObjectArray.h.
SIMD_FORCE_INLINE void* btAlignedObjectArray< T >::allocate | ( | int | size | ) | [inline, protected] |
Definition at line 89 of file btAlignedObjectArray.h.
SIMD_FORCE_INLINE int btAlignedObjectArray< T >::allocSize | ( | int | size | ) | [inline, protected] |
Definition at line 57 of file btAlignedObjectArray.h.
SIMD_FORCE_INLINE const T& btAlignedObjectArray< T >::at | ( | int | n | ) | const [inline] |
Definition at line 141 of file btAlignedObjectArray.h.
SIMD_FORCE_INLINE T& btAlignedObjectArray< T >::at | ( | int | n | ) | [inline] |
Definition at line 148 of file btAlignedObjectArray.h.
SIMD_FORCE_INLINE int btAlignedObjectArray< T >::capacity | ( | ) | const [inline] |
return the pre-allocated (reserved) elements, this is at least as large as the total number of elements,see size() and reserve()
Definition at line 265 of file btAlignedObjectArray.h.
SIMD_FORCE_INLINE void btAlignedObjectArray< T >::clear | ( | ) | [inline] |
clear the array, deallocated memory. Generally it is better to use array.resize(0), to reduce performance overhead of run-time memory (de)allocations.
Definition at line 171 of file btAlignedObjectArray.h.
SIMD_FORCE_INLINE void btAlignedObjectArray< T >::copy | ( | int | start, |
int | end, | ||
T * | dest | ||
) | const [inline, protected] |
Definition at line 61 of file btAlignedObjectArray.h.
void btAlignedObjectArray< T >::copyFromArray | ( | const btAlignedObjectArray< T > & | otherArray | ) | [inline] |
Definition at line 471 of file btAlignedObjectArray.h.
SIMD_FORCE_INLINE void btAlignedObjectArray< T >::deallocate | ( | ) | [inline, protected] |
Definition at line 96 of file btAlignedObjectArray.h.
SIMD_FORCE_INLINE void btAlignedObjectArray< T >::destroy | ( | int | first, |
int | last | ||
) | [inline, protected] |
Definition at line 80 of file btAlignedObjectArray.h.
void btAlignedObjectArray< T >::downHeap | ( | T * | pArr, |
int | k, | ||
int | n, | ||
L | CompareFunc | ||
) | [inline] |
heap sort from http://www.csse.monash.edu.au/~lloyd/tildeAlgDS/Sort/Heap/
Definition at line 346 of file btAlignedObjectArray.h.
SIMD_FORCE_INLINE T& btAlignedObjectArray< T >::expand | ( | const T & | fillValue = T() | ) | [inline] |
Definition at line 230 of file btAlignedObjectArray.h.
SIMD_FORCE_INLINE T& btAlignedObjectArray< T >::expandNonInitializing | ( | ) | [inline] |
Definition at line 217 of file btAlignedObjectArray.h.
int btAlignedObjectArray< T >::findBinarySearch | ( | const T & | key | ) | const [inline] |
non-recursive binary search, assumes sorted array
Definition at line 415 of file btAlignedObjectArray.h.
int btAlignedObjectArray< T >::findLinearSearch | ( | const T & | key | ) | const [inline] |
Definition at line 434 of file btAlignedObjectArray.h.
void btAlignedObjectArray< T >::heapSort | ( | L | CompareFunc | ) | [inline] |
Definition at line 392 of file btAlignedObjectArray.h.
SIMD_FORCE_INLINE void btAlignedObjectArray< T >::init | ( | ) | [inline, protected] |
Definition at line 72 of file btAlignedObjectArray.h.
void btAlignedObjectArray< T >::initializeFromBuffer | ( | void * | buffer, |
int | size, | ||
int | capacity | ||
) | [inline] |
Definition at line 462 of file btAlignedObjectArray.h.
SIMD_FORCE_INLINE const T& btAlignedObjectArray< T >::operator[] | ( | int | n | ) | const [inline] |
Definition at line 155 of file btAlignedObjectArray.h.
SIMD_FORCE_INLINE T& btAlignedObjectArray< T >::operator[] | ( | int | n | ) | [inline] |
Definition at line 162 of file btAlignedObjectArray.h.
SIMD_FORCE_INLINE void btAlignedObjectArray< T >::pop_back | ( | ) | [inline] |
Definition at line 180 of file btAlignedObjectArray.h.
SIMD_FORCE_INLINE void btAlignedObjectArray< T >::push_back | ( | const T & | _Val | ) | [inline] |
Definition at line 246 of file btAlignedObjectArray.h.
void btAlignedObjectArray< T >::quickSort | ( | L | CompareFunc | ) | [inline] |
Definition at line 334 of file btAlignedObjectArray.h.
void btAlignedObjectArray< T >::quickSortInternal | ( | L | CompareFunc, |
int | lo, | ||
int | hi | ||
) | [inline] |
Definition at line 304 of file btAlignedObjectArray.h.
void btAlignedObjectArray< T >::remove | ( | const T & | key | ) | [inline] |
Definition at line 450 of file btAlignedObjectArray.h.
SIMD_FORCE_INLINE void btAlignedObjectArray< T >::reserve | ( | int | _Count | ) | [inline] |
Definition at line 270 of file btAlignedObjectArray.h.
SIMD_FORCE_INLINE void btAlignedObjectArray< T >::resize | ( | int | newsize, |
const T & | fillData = T() |
||
) | [inline] |
resize changes the number of elements in the array. If the new size is larger, the new elements will be constructed using the optional second argument. when the new number of elements is smaller, the destructor will be called, but memory will not be freed, to reduce performance overhead of run-time memory (de)allocations.
Definition at line 189 of file btAlignedObjectArray.h.
SIMD_FORCE_INLINE int btAlignedObjectArray< T >::size | ( | ) | const [inline] |
return the number of elements in the array
Definition at line 136 of file btAlignedObjectArray.h.
void btAlignedObjectArray< T >::swap | ( | int | index0, |
int | index1 | ||
) | [inline] |
Definition at line 376 of file btAlignedObjectArray.h.
btAlignedAllocator<T , 16> btAlignedObjectArray< T >::m_allocator [private] |
Definition at line 48 of file btAlignedObjectArray.h.
int btAlignedObjectArray< T >::m_capacity [private] |
Definition at line 51 of file btAlignedObjectArray.h.
T* btAlignedObjectArray< T >::m_data [private] |
Definition at line 52 of file btAlignedObjectArray.h.
bool btAlignedObjectArray< T >::m_ownsMemory [private] |
Definition at line 54 of file btAlignedObjectArray.h.
int btAlignedObjectArray< T >::m_size [private] |
Definition at line 50 of file btAlignedObjectArray.h.