Classes | Public Member Functions | Protected Member Functions | Private Attributes
btAlignedObjectArray< T > Class Template Reference

#include <btAlignedObjectArray.h>

List of all members.

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

Detailed Description

template<typename T>
class btAlignedObjectArray< T >

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.


Constructor & Destructor Documentation

template<typename T>
btAlignedObjectArray< T >::btAlignedObjectArray ( ) [inline]

Definition at line 113 of file btAlignedObjectArray.h.

template<typename T>
btAlignedObjectArray< T >::~btAlignedObjectArray ( ) [inline]

Definition at line 118 of file btAlignedObjectArray.h.

template<typename T>
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.


Member Function Documentation

template<typename T>
SIMD_FORCE_INLINE void* btAlignedObjectArray< T >::allocate ( int  size) [inline, protected]

Definition at line 89 of file btAlignedObjectArray.h.

template<typename T>
SIMD_FORCE_INLINE int btAlignedObjectArray< T >::allocSize ( int  size) [inline, protected]

Definition at line 57 of file btAlignedObjectArray.h.

template<typename T>
SIMD_FORCE_INLINE const T& btAlignedObjectArray< T >::at ( int  n) const [inline]

Definition at line 141 of file btAlignedObjectArray.h.

template<typename T>
SIMD_FORCE_INLINE T& btAlignedObjectArray< T >::at ( int  n) [inline]

Definition at line 148 of file btAlignedObjectArray.h.

template<typename T>
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.

template<typename T>
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.

template<typename T>
SIMD_FORCE_INLINE void btAlignedObjectArray< T >::copy ( int  start,
int  end,
T *  dest 
) const [inline, protected]

Definition at line 61 of file btAlignedObjectArray.h.

template<typename T>
void btAlignedObjectArray< T >::copyFromArray ( const btAlignedObjectArray< T > &  otherArray) [inline]

Definition at line 471 of file btAlignedObjectArray.h.

template<typename T>
SIMD_FORCE_INLINE void btAlignedObjectArray< T >::deallocate ( ) [inline, protected]

Definition at line 96 of file btAlignedObjectArray.h.

template<typename T>
SIMD_FORCE_INLINE void btAlignedObjectArray< T >::destroy ( int  first,
int  last 
) [inline, protected]

Definition at line 80 of file btAlignedObjectArray.h.

template<typename T>
template<typename L >
void btAlignedObjectArray< T >::downHeap ( T *  pArr,
int  k,
int  n,
CompareFunc 
) [inline]
template<typename T>
SIMD_FORCE_INLINE T& btAlignedObjectArray< T >::expand ( const T &  fillValue = T()) [inline]

Definition at line 230 of file btAlignedObjectArray.h.

template<typename T>
SIMD_FORCE_INLINE T& btAlignedObjectArray< T >::expandNonInitializing ( ) [inline]

Definition at line 217 of file btAlignedObjectArray.h.

template<typename T>
int btAlignedObjectArray< T >::findBinarySearch ( const T &  key) const [inline]

non-recursive binary search, assumes sorted array

Definition at line 415 of file btAlignedObjectArray.h.

template<typename T>
int btAlignedObjectArray< T >::findLinearSearch ( const T &  key) const [inline]

Definition at line 434 of file btAlignedObjectArray.h.

template<typename T>
template<typename L >
void btAlignedObjectArray< T >::heapSort ( CompareFunc) [inline]

Definition at line 392 of file btAlignedObjectArray.h.

template<typename T>
SIMD_FORCE_INLINE void btAlignedObjectArray< T >::init ( ) [inline, protected]

Definition at line 72 of file btAlignedObjectArray.h.

template<typename T>
void btAlignedObjectArray< T >::initializeFromBuffer ( void *  buffer,
int  size,
int  capacity 
) [inline]

Definition at line 462 of file btAlignedObjectArray.h.

template<typename T>
SIMD_FORCE_INLINE const T& btAlignedObjectArray< T >::operator[] ( int  n) const [inline]

Definition at line 155 of file btAlignedObjectArray.h.

template<typename T>
SIMD_FORCE_INLINE T& btAlignedObjectArray< T >::operator[] ( int  n) [inline]

Definition at line 162 of file btAlignedObjectArray.h.

template<typename T>
SIMD_FORCE_INLINE void btAlignedObjectArray< T >::pop_back ( ) [inline]

Definition at line 180 of file btAlignedObjectArray.h.

template<typename T>
SIMD_FORCE_INLINE void btAlignedObjectArray< T >::push_back ( const T &  _Val) [inline]

Definition at line 246 of file btAlignedObjectArray.h.

template<typename T>
template<typename L >
void btAlignedObjectArray< T >::quickSort ( CompareFunc) [inline]

Definition at line 334 of file btAlignedObjectArray.h.

template<typename T>
template<typename L >
void btAlignedObjectArray< T >::quickSortInternal ( CompareFunc,
int  lo,
int  hi 
) [inline]

Definition at line 304 of file btAlignedObjectArray.h.

template<typename T>
void btAlignedObjectArray< T >::remove ( const T &  key) [inline]

Definition at line 450 of file btAlignedObjectArray.h.

template<typename T>
SIMD_FORCE_INLINE void btAlignedObjectArray< T >::reserve ( int  _Count) [inline]

Definition at line 270 of file btAlignedObjectArray.h.

template<typename T>
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.

template<typename T>
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.

template<typename T>
void btAlignedObjectArray< T >::swap ( int  index0,
int  index1 
) [inline]

Definition at line 376 of file btAlignedObjectArray.h.


Member Data Documentation

template<typename T>
btAlignedAllocator<T , 16> btAlignedObjectArray< T >::m_allocator [private]

Definition at line 48 of file btAlignedObjectArray.h.

template<typename T>
int btAlignedObjectArray< T >::m_capacity [private]

Definition at line 51 of file btAlignedObjectArray.h.

template<typename T>
T* btAlignedObjectArray< T >::m_data [private]

Definition at line 52 of file btAlignedObjectArray.h.

template<typename T>
bool btAlignedObjectArray< T >::m_ownsMemory [private]

Definition at line 54 of file btAlignedObjectArray.h.

template<typename T>
int btAlignedObjectArray< T >::m_size [private]

Definition at line 50 of file btAlignedObjectArray.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


bullet
Author(s): Erwin Coumans, ROS package maintained by Tully Foote
autogenerated on Wed Oct 31 2012 07:54:32