Blender V2.61 - r43446
|
Very simple array container with fast access and simd memory. More...
#include <gim_array.h>
Public Member Functions | |
void | destroyData () |
bool | resizeData (GUINT newsize) |
bool | growingCheck () |
bool | reserve (GUINT size) |
void | clear_range (GUINT start_range) |
void | clear () |
void | clear_memory () |
gim_array () | |
gim_array (GUINT reservesize) | |
~gim_array () | |
GUINT | size () const |
GUINT | max_size () const |
T & | operator[] (size_t i) |
const T & | operator[] (size_t i) const |
T * | pointer () |
const T * | pointer () const |
T * | get_pointer_at (GUINT i) |
const T * | get_pointer_at (GUINT i) const |
T & | at (GUINT i) |
const T & | at (GUINT i) const |
T & | front () |
const T & | front () const |
T & | back () |
const T & | back () const |
void | swap (GUINT i, GUINT j) |
void | push_back (const T &obj) |
void | push_back_mem () |
Simply increase the m_size, doesn't call the new element constructor. | |
void | push_back_memcpy (const T &obj) |
void | pop_back () |
void | pop_back_mem () |
Simply decrease the m_size, doesn't call the deleted element destructor. | |
void | erase (GUINT index) |
fast erase | |
void | erase_sorted_mem (GUINT index) |
void | erase_sorted (GUINT index) |
void | insert_mem (GUINT index) |
void | insert (const T &obj, GUINT index) |
void | resize (GUINT size, bool call_constructor=true) |
void | refit () |
Public Attributes | |
T * | m_data |
GUINT | m_size |
GUINT | m_allocated_size |
Very simple array container with fast access and simd memory.
Definition at line 43 of file gim_array.h.
public operations
Definition at line 123 of file gim_array.h.
public operations
Definition at line 130 of file gim_array.h.
public operations
Definition at line 139 of file gim_array.h.
T& gim_array< T >::at | ( | GUINT | i | ) | [inline] |
public operations
Definition at line 178 of file gim_array.h.
const T& gim_array< T >::at | ( | GUINT | i | ) | const [inline] |
public operations
Definition at line 183 of file gim_array.h.
T& gim_array< T >::back | ( | ) | [inline] |
public operations
Definition at line 198 of file gim_array.h.
Referenced by GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::find_collision_pairs(), gim_contact_array::merge_contacts(), and gim_contact_array::merge_contacts_unique().
const T& gim_array< T >::back | ( | ) | const [inline] |
public operations
Definition at line 203 of file gim_array.h.
void gim_array< T >::clear | ( | ) | [inline] |
public operations
Definition at line 111 of file gim_array.h.
Referenced by gim_hash_table< T >::clear(), gim_array< GIM_CONTACT >::clear_memory(), and GIM_BOX_TREE::clearNodes().
void gim_array< T >::clear_memory | ( | ) | [inline] |
public operations
Definition at line 117 of file gim_array.h.
Referenced by gim_array< GIM_CONTACT >::~gim_array().
void gim_array< T >::clear_range | ( | GUINT | start_range | ) | [inline] |
public operations
Definition at line 103 of file gim_array.h.
Referenced by gim_array< GIM_CONTACT >::clear(), and gim_array< GIM_CONTACT >::resize().
void gim_array< T >::destroyData | ( | ) | [inline] |
protected operations
Definition at line 55 of file gim_array.h.
Referenced by gim_array< GIM_CONTACT >::clear_memory(), and gim_array< GIM_CONTACT >::resizeData().
void gim_array< T >::erase | ( | GUINT | index | ) | [inline] |
fast erase
Definition at line 248 of file gim_array.h.
Referenced by gim_hash_table< T >::_erase_unsorted().
void gim_array< T >::erase_sorted | ( | GUINT | index | ) | [inline] |
public operations
Definition at line 266 of file gim_array.h.
Referenced by gim_hash_table< T >::_erase_sorted().
void gim_array< T >::erase_sorted_mem | ( | GUINT | index | ) | [inline] |
public operations
Definition at line 257 of file gim_array.h.
Referenced by gim_array< GIM_CONTACT >::erase_sorted().
T& gim_array< T >::front | ( | ) | [inline] |
public operations
Definition at line 188 of file gim_array.h.
const T& gim_array< T >::front | ( | ) | const [inline] |
public operations
Definition at line 193 of file gim_array.h.
T* gim_array< T >::get_pointer_at | ( | GUINT | i | ) | [inline] |
public operations
Definition at line 168 of file gim_array.h.
const T* gim_array< T >::get_pointer_at | ( | GUINT | i | ) | const [inline] |
public operations
Definition at line 173 of file gim_array.h.
bool gim_array< T >::growingCheck | ( | ) | [inline] |
protected operations
Definition at line 83 of file gim_array.h.
Referenced by gim_array< GIM_CONTACT >::insert_mem(), gim_array< GIM_CONTACT >::push_back(), gim_array< GIM_CONTACT >::push_back_mem(), and gim_array< GIM_CONTACT >::push_back_memcpy().
void gim_array< T >::insert | ( | const T & | obj, |
GUINT | index | ||
) | [inline] |
public operations
Definition at line 282 of file gim_array.h.
Referenced by gim_hash_table< T >::_insert_in_pos().
void gim_array< T >::insert_mem | ( | GUINT | index | ) | [inline] |
public operations
Definition at line 272 of file gim_array.h.
Referenced by gim_array< GIM_CONTACT >::insert().
GUINT gim_array< T >::max_size | ( | ) | const [inline] |
public operations
Definition at line 149 of file gim_array.h.
T& gim_array< T >::operator[] | ( | size_t | i | ) | [inline] |
public operations
Definition at line 154 of file gim_array.h.
const T& gim_array< T >::operator[] | ( | size_t | i | ) | const [inline] |
public operations
Definition at line 158 of file gim_array.h.
T* gim_array< T >::pointer | ( | ) | [inline] |
public operations
Definition at line 163 of file gim_array.h.
Referenced by gim_hash_table< T >::_find_avaliable_cell(), gim_hash_table< T >::_find_cell(), gim_hash_table< T >::_insert_sorted(), gim_hash_table< T >::_insert_sorted_replace(), gim_hash_table< T >::_rehash(), gim_hash_table< T >::find(), and gim_hash_table< T >::sort().
const T* gim_array< T >::pointer | ( | ) | const [inline] |
public operations
Definition at line 164 of file gim_array.h.
void gim_array< T >::pop_back | ( | ) | [inline] |
public operations
Definition at line 235 of file gim_array.h.
Referenced by gim_array< GIM_CONTACT >::erase(), and GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::find_collision_pairs().
void gim_array< T >::pop_back_mem | ( | ) | [inline] |
Simply decrease the m_size, doesn't call the deleted element destructor.
Definition at line 242 of file gim_array.h.
void gim_array< T >::push_back | ( | const T & | obj | ) | [inline] |
public operations
Definition at line 214 of file gim_array.h.
Referenced by gim_hash_table< T >::_insert_sorted(), gim_hash_table< T >::_insert_sorted_replace(), gim_hash_table< T >::_insert_unsorted(), GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE >::boxQuery(), and GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE >::rayQuery().
void gim_array< T >::push_back_mem | ( | ) | [inline] |
Simply increase the m_size, doesn't call the new element constructor.
Definition at line 222 of file gim_array.h.
void gim_array< T >::push_back_memcpy | ( | const T & | obj | ) | [inline] |
public operations
Definition at line 228 of file gim_array.h.
void gim_array< T >::refit | ( | ) | [inline] |
public operations
Definition at line 315 of file gim_array.h.
bool gim_array< T >::reserve | ( | GUINT | size | ) | [inline] |
public operations
Definition at line 97 of file gim_array.h.
Referenced by GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::find_collision_pairs(), gim_array< GIM_CONTACT >::gim_array(), gim_hash_table< T >::gim_hash_table(), and gim_array< GIM_CONTACT >::resize().
void gim_array< T >::resize | ( | GUINT | size, |
bool | call_constructor = true |
||
) | [inline] |
public operations
Definition at line 288 of file gim_array.h.
Referenced by GIM_BOX_TREE::build_tree(), GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE >::buildSet(), gim_contact_array::merge_contacts(), and gim_bitset::resize().
bool gim_array< T >::resizeData | ( | GUINT | newsize | ) | [inline] |
protected operations
Definition at line 63 of file gim_array.h.
Referenced by gim_array< GIM_CONTACT >::growingCheck(), gim_array< GIM_CONTACT >::refit(), and gim_array< GIM_CONTACT >::reserve().
GUINT gim_array< T >::size | ( | ) | const [inline] |
public operations
Definition at line 144 of file gim_array.h.
Referenced by gim_hash_table< T >::_erase_by_index_hash_table(), gim_hash_table< T >::_erase_sorted(), gim_hash_table< T >::_erase_unsorted(), gim_hash_table< T >::_insert_hash_table(), gim_hash_table< T >::_insert_hash_table_replace(), gim_hash_table< T >::_insert_sorted(), gim_hash_table< T >::_insert_sorted_replace(), gim_hash_table< T >::_rehash(), GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE >::boxQuery(), GIM_BOX_TREE::build_tree(), GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE >::buildSet(), gim_hash_table< T >::check_for_switching_to_hashtable(), gim_bitset::clear_all(), gim_hash_table< T >::erase_by_index(), gim_hash_table< T >::erase_by_index_unsorted(), gim_hash_table< T >::find(), GIM_TREE_TREE_COLLIDER< BOX_SET_CLASS0, BOX_SET_CLASS1 >::find_collision_pairs(), gim_hash_table< T >::insert_override(), gim_contact_array::merge_contacts(), gim_contact_array::merge_contacts_unique(), GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE >::rayQuery(), gim_bitset::resize(), gim_array< GIM_CONTACT >::resize(), gim_bitset::set_all(), gim_hash_table< T >::size(), gim_bitset::size(), gim_hash_table< T >::sort(), and gim_hash_table< T >::switch_to_hashtable().
void gim_array< T >::swap | ( | GUINT | i, |
GUINT | j | ||
) | [inline] |
public operations
Definition at line 209 of file gim_array.h.
Referenced by GIM_BOX_TREE::_sort_and_calc_splitting_index(), and gim_array< GIM_CONTACT >::erase().
GUINT gim_array< T >::m_allocated_size |
properties
Definition at line 50 of file gim_array.h.
Referenced by gim_array< GIM_CONTACT >::destroyData(), gim_array< GIM_CONTACT >::gim_array(), gim_array< GIM_CONTACT >::growingCheck(), gim_array< GIM_CONTACT >::max_size(), gim_array< GIM_CONTACT >::reserve(), and gim_array< GIM_CONTACT >::resizeData().
properties
Definition at line 48 of file gim_array.h.
Referenced by GIM_BOX_TREE::_build_sub_tree(), gim_array< GIM_CONTACT >::at(), gim_array< GIM_CONTACT >::back(), GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE >::buildSet(), gim_array< GIM_CONTACT >::clear_range(), gim_array< GIM_CONTACT >::destroyData(), gim_array< GIM_CONTACT >::erase_sorted(), gim_array< GIM_CONTACT >::erase_sorted_mem(), gim_array< GIM_CONTACT >::front(), gim_array< GIM_CONTACT >::get_pointer_at(), gim_hash_table< T >::get_value(), gim_hash_table< T >::get_value_by_index(), GIM_BOX_TREE::getNodeData(), gim_array< GIM_CONTACT >::gim_array(), gim_array< GIM_CONTACT >::insert(), gim_array< GIM_CONTACT >::insert_mem(), gim_array< GIM_CONTACT >::operator[](), gim_hash_table< T >::operator[](), gim_array< GIM_CONTACT >::pointer(), gim_array< GIM_CONTACT >::pop_back(), gim_array< GIM_CONTACT >::push_back(), gim_array< GIM_CONTACT >::push_back_memcpy(), gim_array< GIM_CONTACT >::resize(), gim_array< GIM_CONTACT >::resizeData(), and gim_array< GIM_CONTACT >::swap().
properties
Definition at line 49 of file gim_array.h.
Referenced by gim_array< GIM_CONTACT >::back(), gim_array< GIM_CONTACT >::clear(), gim_array< GIM_CONTACT >::clear_range(), gim_array< GIM_CONTACT >::erase(), gim_array< GIM_CONTACT >::erase_sorted_mem(), gim_array< GIM_CONTACT >::gim_array(), gim_array< GIM_CONTACT >::growingCheck(), gim_array< GIM_CONTACT >::insert_mem(), gim_array< GIM_CONTACT >::pop_back(), gim_array< GIM_CONTACT >::pop_back_mem(), gim_array< GIM_CONTACT >::push_back(), gim_array< GIM_CONTACT >::push_back_mem(), gim_array< GIM_CONTACT >::push_back_memcpy(), gim_array< GIM_CONTACT >::refit(), gim_array< GIM_CONTACT >::resize(), gim_array< GIM_CONTACT >::resizeData(), and gim_array< GIM_CONTACT >::size().