Opm::FastSmallVector< ValueType, N > Class Template Reference

An implementation of vector/array based on small object optimization. It is intended to be used by the DynamicEvaluation for better efficiency. More...

#include <FastSmallVector.hpp>

Inheritance diagram for Opm::FastSmallVector< ValueType, N >:
Inheritance graph

Public Member Functions

 FastSmallVector ()
 default constructor More...
 
 FastSmallVector (const size_t numElem)
 constructor based on the number of the element More...
 
 FastSmallVector (const size_t numElem, const ValueType value)
 
 FastSmallVector (const FastSmallVector &other)
 copy constructor More...
 
 FastSmallVector (FastSmallVector &&other)
 move constructor More...
 
 ~FastSmallVector ()
 destructor More...
 
FastSmallVectoroperator= (FastSmallVector &&other)
 move assignment More...
 
FastSmallVectoroperator= (const FastSmallVector &other)
 copy assignment More...
 
ValueType & operator[] (size_t idx)
 access the idx th element More...
 
const ValueType & operator[] (size_t idx) const
 const access the idx th element More...
 
size_t size () const
 number of the element More...
 

Detailed Description

template<typename ValueType, unsigned N>
class Opm::FastSmallVector< ValueType, N >

An implementation of vector/array based on small object optimization. It is intended to be used by the DynamicEvaluation for better efficiency.

ValueType is the type of the data N is the size of the buffer that willl be allocated during compilation time

Constructor & Destructor Documentation

◆ FastSmallVector() [1/5]

template<typename ValueType , unsigned N>
Opm::FastSmallVector< ValueType, N >::FastSmallVector ( )
inline

default constructor

◆ FastSmallVector() [2/5]

template<typename ValueType , unsigned N>
Opm::FastSmallVector< ValueType, N >::FastSmallVector ( const size_t  numElem)
inlineexplicit

constructor based on the number of the element

◆ FastSmallVector() [3/5]

template<typename ValueType , unsigned N>
Opm::FastSmallVector< ValueType, N >::FastSmallVector ( const size_t  numElem,
const ValueType  value 
)
inline

constructor based on the number of the element, and all the elements will have the same value

◆ FastSmallVector() [4/5]

template<typename ValueType , unsigned N>
Opm::FastSmallVector< ValueType, N >::FastSmallVector ( const FastSmallVector< ValueType, N > &  other)
inline

copy constructor

◆ FastSmallVector() [5/5]

template<typename ValueType , unsigned N>
Opm::FastSmallVector< ValueType, N >::FastSmallVector ( FastSmallVector< ValueType, N > &&  other)
inline

move constructor

◆ ~FastSmallVector()

template<typename ValueType , unsigned N>
Opm::FastSmallVector< ValueType, N >::~FastSmallVector ( )
inline

destructor

Member Function Documentation

◆ operator=() [1/2]

template<typename ValueType , unsigned N>
FastSmallVector & Opm::FastSmallVector< ValueType, N >::operator= ( const FastSmallVector< ValueType, N > &  other)
inline

copy assignment

◆ operator=() [2/2]

template<typename ValueType , unsigned N>
FastSmallVector & Opm::FastSmallVector< ValueType, N >::operator= ( FastSmallVector< ValueType, N > &&  other)
inline

move assignment

◆ operator[]() [1/2]

template<typename ValueType , unsigned N>
ValueType & Opm::FastSmallVector< ValueType, N >::operator[] ( size_t  idx)
inline

access the idx th element

◆ operator[]() [2/2]

template<typename ValueType , unsigned N>
const ValueType & Opm::FastSmallVector< ValueType, N >::operator[] ( size_t  idx) const
inline

const access the idx th element

◆ size()

template<typename ValueType , unsigned N>
size_t Opm::FastSmallVector< ValueType, N >::size ( ) const
inline

number of the element


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