BioDynaMo  v1.05.120-25dc9790
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
bdm::ParallelResizeVector< T > Class Template Reference

std::vector with parallel resize More...

#include <parallel_resize_vector.h>

Collaboration diagram for bdm::ParallelResizeVector< T >:
[legend]

Public Types

using iterator = T *
 
using const_iterator = const T *
 
using value_type = T
 

Public Member Functions

 ParallelResizeVector (TRootIOCtor *io_ctor)
 
 ParallelResizeVector ()=default
 
 ParallelResizeVector (std::initializer_list< T > init)
 
 ParallelResizeVector (std::size_t new_size, const T &t=T())
 
 ParallelResizeVector (const ParallelResizeVector &other)
 
virtual ~ParallelResizeVector ()
 
std::size_t size () const
 
T * data () noexcept
 
const T * data () const noexcept
 
void swap (ParallelResizeVector &other)
 
std::size_t capacity () const
 
void push_back (const T &element)
 
void reserve (std::size_t new_capacity)
 
void resize (std::size_t new_size, const T &t=T())
 
void clear ()
 
ParallelResizeVectoroperator= (const ParallelResizeVector &other)
 
T & operator[] (std::size_t index)
 
const T & operator[] (std::size_t index) const
 
iterator begin ()
 
iterator end ()
 
const_iterator cbegin ()
 
const_iterator cend ()
 

Private Member Functions

 BDM_CLASS_DEF (ParallelResizeVector, 1)
 

Private Attributes

std::size_t size_ = 0
 
std::size_t capacity_ = 0
 
T * data_ = nullptr
 

Static Private Attributes

static constexpr float kGrowFactor = 1.5
 

Detailed Description

template<typename T>
class bdm::ParallelResizeVector< T >

std::vector with parallel resize

Definition at line 27 of file parallel_resize_vector.h.

Member Typedef Documentation

◆ const_iterator

template<typename T >
using bdm::ParallelResizeVector< T >::const_iterator = const T*

Definition at line 30 of file parallel_resize_vector.h.

◆ iterator

template<typename T >
using bdm::ParallelResizeVector< T >::iterator = T*

Definition at line 29 of file parallel_resize_vector.h.

◆ value_type

template<typename T >
using bdm::ParallelResizeVector< T >::value_type = T

Definition at line 31 of file parallel_resize_vector.h.

Constructor & Destructor Documentation

◆ ParallelResizeVector() [1/5]

template<typename T >
bdm::ParallelResizeVector< T >::ParallelResizeVector ( TRootIOCtor *  io_ctor)
inlineexplicit

Definition at line 33 of file parallel_resize_vector.h.

◆ ParallelResizeVector() [2/5]

template<typename T >
bdm::ParallelResizeVector< T >::ParallelResizeVector ( )
default

◆ ParallelResizeVector() [3/5]

template<typename T >
bdm::ParallelResizeVector< T >::ParallelResizeVector ( std::initializer_list< T >  init)
inline

Definition at line 36 of file parallel_resize_vector.h.

◆ ParallelResizeVector() [4/5]

template<typename T >
bdm::ParallelResizeVector< T >::ParallelResizeVector ( std::size_t  new_size,
const T &  t = T() 
)
inline

Definition at line 43 of file parallel_resize_vector.h.

◆ ParallelResizeVector() [5/5]

template<typename T >
bdm::ParallelResizeVector< T >::ParallelResizeVector ( const ParallelResizeVector< T > &  other)
inline

Definition at line 47 of file parallel_resize_vector.h.

◆ ~ParallelResizeVector()

template<typename T >
virtual bdm::ParallelResizeVector< T >::~ParallelResizeVector ( )
inlinevirtual

Definition at line 60 of file parallel_resize_vector.h.

Member Function Documentation

◆ BDM_CLASS_DEF()

template<typename T >
bdm::ParallelResizeVector< T >::BDM_CLASS_DEF ( ParallelResizeVector< T >  ,
 
)
private

◆ begin()

template<typename T >
iterator bdm::ParallelResizeVector< T >::begin ( )
inline

Definition at line 170 of file parallel_resize_vector.h.

◆ capacity()

template<typename T >
std::size_t bdm::ParallelResizeVector< T >::capacity ( ) const
inline

Definition at line 92 of file parallel_resize_vector.h.

◆ cbegin()

template<typename T >
const_iterator bdm::ParallelResizeVector< T >::cbegin ( )
inline

Definition at line 174 of file parallel_resize_vector.h.

◆ cend()

template<typename T >
const_iterator bdm::ParallelResizeVector< T >::cend ( )
inline

Definition at line 176 of file parallel_resize_vector.h.

◆ clear()

template<typename T >
void bdm::ParallelResizeVector< T >::clear ( )
inline

Definition at line 140 of file parallel_resize_vector.h.

◆ data() [1/2]

template<typename T >
const T* bdm::ParallelResizeVector< T >::data ( ) const
inlinenoexcept

Definition at line 75 of file parallel_resize_vector.h.

◆ data() [2/2]

template<typename T >
T* bdm::ParallelResizeVector< T >::data ( )
inlinenoexcept

Definition at line 74 of file parallel_resize_vector.h.

◆ end()

template<typename T >
iterator bdm::ParallelResizeVector< T >::end ( )
inline

Definition at line 172 of file parallel_resize_vector.h.

◆ operator=()

template<typename T >
ParallelResizeVector& bdm::ParallelResizeVector< T >::operator= ( const ParallelResizeVector< T > &  other)
inline

Definition at line 147 of file parallel_resize_vector.h.

◆ operator[]() [1/2]

template<typename T >
T& bdm::ParallelResizeVector< T >::operator[] ( std::size_t  index)
inline

Definition at line 166 of file parallel_resize_vector.h.

◆ operator[]() [2/2]

template<typename T >
const T& bdm::ParallelResizeVector< T >::operator[] ( std::size_t  index) const
inline

Definition at line 168 of file parallel_resize_vector.h.

◆ push_back()

template<typename T >
void bdm::ParallelResizeVector< T >::push_back ( const T &  element)
inline

Definition at line 94 of file parallel_resize_vector.h.

◆ reserve()

template<typename T >
void bdm::ParallelResizeVector< T >::reserve ( std::size_t  new_capacity)
inline

Definition at line 101 of file parallel_resize_vector.h.

◆ resize()

template<typename T >
void bdm::ParallelResizeVector< T >::resize ( std::size_t  new_size,
const T &  t = T() 
)
inline

Definition at line 122 of file parallel_resize_vector.h.

◆ size()

template<typename T >
std::size_t bdm::ParallelResizeVector< T >::size ( ) const
inline

Definition at line 72 of file parallel_resize_vector.h.

◆ swap()

template<typename T >
void bdm::ParallelResizeVector< T >::swap ( ParallelResizeVector< T > &  other)
inline

Definition at line 77 of file parallel_resize_vector.h.

Member Data Documentation

◆ capacity_

template<typename T >
std::size_t bdm::ParallelResizeVector< T >::capacity_ = 0
private

Definition at line 181 of file parallel_resize_vector.h.

◆ data_

template<typename T >
T* bdm::ParallelResizeVector< T >::data_ = nullptr
private

Definition at line 182 of file parallel_resize_vector.h.

◆ kGrowFactor

template<typename T >
constexpr float bdm::ParallelResizeVector< T >::kGrowFactor = 1.5
staticconstexprprivate

Definition at line 179 of file parallel_resize_vector.h.

◆ size_

template<typename T >
std::size_t bdm::ParallelResizeVector< T >::size_ = 0
private

Definition at line 180 of file parallel_resize_vector.h.


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