Blender V4.5
gim_array< T > Class Template Reference

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, const T &fillData=T())
 
void refit ()
 

Public Attributes

T * m_data
 
GUINT m_size
 
GUINT m_allocated_size
 

Detailed Description

template<typename T>
class gim_array< T >

Very simple array container with fast access and simd memory.

Definition at line 42 of file gim_array.h.

Constructor & Destructor Documentation

◆ gim_array() [1/2]

template<typename T >
gim_array< T >::gim_array ( )
inline

◆ gim_array() [2/2]

template<typename T >
gim_array< T >::gim_array ( GUINT reservesize)
inline

◆ ~gim_array()

template<typename T >
gim_array< T >::~gim_array ( )
inline

Definition at line 138 of file gim_array.h.

References gim_array< T >::clear_memory().

Member Function Documentation

◆ at() [1/2]

template<typename T >
T & gim_array< T >::at ( GUINT i)
inline

Definition at line 178 of file gim_array.h.

References gim_array< T >::m_data.

◆ at() [2/2]

template<typename T >
const T & gim_array< T >::at ( GUINT i) const
inline

Definition at line 183 of file gim_array.h.

References gim_array< T >::m_data.

◆ back() [1/2]

◆ back() [2/2]

template<typename T >
const T & gim_array< T >::back ( ) const
inline

Definition at line 203 of file gim_array.h.

References gim_array< T >::m_data, and gim_array< T >::m_size.

◆ clear()

template<typename T >
void gim_array< T >::clear ( )
inline

◆ clear_memory()

template<typename T >
void gim_array< T >::clear_memory ( )
inline

Definition at line 116 of file gim_array.h.

References gim_array< T >::clear(), and gim_array< T >::destroyData().

Referenced by gim_array< T >::~gim_array().

◆ clear_range()

template<typename T >
void gim_array< T >::clear_range ( GUINT start_range)
inline

Definition at line 102 of file gim_array.h.

References gim_array< T >::m_data, and gim_array< T >::m_size.

Referenced by gim_array< T >::clear(), and gim_array< T >::resize().

◆ destroyData()

template<typename T >
void gim_array< T >::destroyData ( )
inline

protected operations

Definition at line 54 of file gim_array.h.

References gim_free(), gim_array< T >::m_allocated_size, and gim_array< T >::m_data.

Referenced by gim_array< T >::clear_memory(), and gim_array< T >::resizeData().

◆ erase()

template<typename T >
void gim_array< T >::erase ( GUINT index)
inline

fast erase

Definition at line 247 of file gim_array.h.

References gim_array< T >::m_size, gim_array< T >::pop_back(), and swap.

◆ erase_sorted()

template<typename T >
void gim_array< T >::erase_sorted ( GUINT index)
inline

Definition at line 265 of file gim_array.h.

References gim_array< T >::erase_sorted_mem(), and gim_array< T >::m_data.

◆ erase_sorted_mem()

template<typename T >
void gim_array< T >::erase_sorted_mem ( GUINT index)
inline

◆ front() [1/2]

template<typename T >
T & gim_array< T >::front ( )
inline

Definition at line 188 of file gim_array.h.

References gim_array< T >::m_data.

◆ front() [2/2]

template<typename T >
const T & gim_array< T >::front ( ) const
inline

Definition at line 193 of file gim_array.h.

References gim_array< T >::m_data.

◆ get_pointer_at() [1/2]

template<typename T >
T * gim_array< T >::get_pointer_at ( GUINT i)
inline

Definition at line 168 of file gim_array.h.

References gim_array< T >::m_data.

◆ get_pointer_at() [2/2]

template<typename T >
const T * gim_array< T >::get_pointer_at ( GUINT i) const
inline

Definition at line 173 of file gim_array.h.

References gim_array< T >::m_data.

◆ growingCheck()

◆ insert()

template<typename T >
void gim_array< T >::insert ( const T & obj,
GUINT index )
inline

Definition at line 281 of file gim_array.h.

References gim_array< T >::insert_mem(), and gim_array< T >::m_data.

◆ insert_mem()

template<typename T >
void gim_array< T >::insert_mem ( GUINT index)
inline

◆ max_size()

template<typename T >
GUINT gim_array< T >::max_size ( ) const
inline

Definition at line 148 of file gim_array.h.

References gim_array< T >::m_allocated_size.

◆ operator[]() [1/2]

template<typename T >
T & gim_array< T >::operator[] ( size_t i)
inline

Definition at line 153 of file gim_array.h.

References gim_array< T >::m_data.

◆ operator[]() [2/2]

template<typename T >
const T & gim_array< T >::operator[] ( size_t i) const
inline

Definition at line 157 of file gim_array.h.

References gim_array< T >::m_data.

◆ pointer() [1/2]

template<typename T >
T * gim_array< T >::pointer ( )
inline

Definition at line 162 of file gim_array.h.

References gim_array< T >::m_data.

Referenced by gim_contact_array::merge_contacts().

◆ pointer() [2/2]

template<typename T >
const T * gim_array< T >::pointer ( ) const
inline

Definition at line 163 of file gim_array.h.

References gim_array< T >::m_data.

◆ pop_back()

template<typename T >
void gim_array< T >::pop_back ( )
inline

◆ pop_back_mem()

template<typename T >
void gim_array< T >::pop_back_mem ( )
inline

Simply decrease the m_size, doesn't call the deleted element destructor.

Definition at line 241 of file gim_array.h.

References gim_array< T >::m_size.

◆ push_back()

◆ push_back_mem()

template<typename T >
void gim_array< T >::push_back_mem ( )
inline

Simply increase the m_size, doesn't call the new element constructor.

Definition at line 221 of file gim_array.h.

References gim_array< T >::growingCheck().

◆ push_back_memcpy()

template<typename T >
void gim_array< T >::push_back_memcpy ( const T & obj)
inline

◆ refit()

template<typename T >
void gim_array< T >::refit ( )
inline

Definition at line 312 of file gim_array.h.

References gim_array< T >::m_size, and gim_array< T >::resizeData().

◆ reserve()

◆ resize()

◆ resizeData()

◆ size()

◆ swap()

template<typename T >
void gim_array< T >::swap ( GUINT i,
GUINT j )
inline

Member Data Documentation

◆ m_allocated_size

◆ m_data

◆ m_size


The documentation for this class was generated from the following file: