Documentation 6b54b78464
Loading...
Searching...
No Matches
container_details::AccessorImpl< Index_t, Scalar_t, Store, AlignSize, StaticRows, StaticCols > Class Template Reference

Base accessor class and version of template for both sizes known at compile time. More...

#include <C2DContainer.hpp>

Inherited by C2DContainer< su2double >, C2DContainer< uint8_t >, C2DContainer< Index_t >, C2DContainer< nVar >, C2DContainer< TURBO_INTERFACE_KIND >, C2DContainer< unsigned >, C2DContainer< bool >, C2DContainer< Index, Index, StorageType::ColumnMajor, 64, DynamicSize, 2 >, C2DContainer< unsigned short >, C2DContainer< unsigned long >, C2DContainer< su2uint >, C2DContainer< std::string >, C2DContainer< C2DContainer >, C2DContainer< C2DContainer< unsigned long > >, C2DContainer< int8_t >, C2DContainer< simd::Array, nVarGrad, nDim >, C2DContainer< unsigned long, bool, StorageType::ColumnMajor, 64, DynamicSize, 1 >, C2DContainer< std::pair< su2double *, su2double * > >, C2DContainer< std::vector< std::array< unsigned long, 2 > > >, C2DContainer< C2DContainer< std::vector< unsigned long > > >, C2DContainer< CTrapezoidalMap >, C2DContainer< C2DContainer< C2DContainer > >, C2DContainer< int >, C2DContainer< su2int >, C2DContainer< AD::Identifier >, C2DContainer< Scalar >, C2DContainer< nDim >, C2DContainer< simd::Array, nVar, nVar >, C2DContainer< simd::Array, Size >, C2DContainer< passivedouble >, C2DContainer< unsigned long, su2double, StorageType::RowMajor, 64, DynamicSize, DynamicSize >, C2DContainer< unsigned long, su2double, StorageType::ColumnMajor, 64, DynamicSize, 1 >, C2DContainer< simd::Array, Size, Size >, and C2DContainer< Index_t, Scalar_t, Store, AlignSize, StaticRows, StaticCols >.

Public Member Functions

bool empty () const noexcept
 
Scalar_t * data () noexcept
 
const Scalar_t * data () const noexcept
 
Scalar_t * begin () noexcept
 
const Scalar_t * begin () const noexcept
 
Scalar_t * end () noexcept
 
const Scalar_t * end () const noexcept
 
Index_t rows () const noexcept
 
Index_t cols () const noexcept
 
size_t size () const noexcept
 
const Scalar_t & operator() (const Index_t i, const Index_t j) const noexcept
 
Scalar_t & operator() (const Index_t i, const Index_t j) noexcept
 
const Scalar_t * operator[] (const Index_t k) const noexcept
 
Scalar_t * operator[] (const Index_t k) noexcept
 

Protected Member Functions

void m_allocate (size_t sz, Index_t rows, Index_t cols) noexcept
 
void m_destroy () noexcept
 

Protected Attributes

Scalar_t m_data [StaticRows *StaticCols]
 

Detailed Description

template<typename Index_t, class Scalar_t, StorageType Store, size_t AlignSize, size_t StaticRows, size_t StaticCols>
class container_details::AccessorImpl< Index_t, Scalar_t, Store, AlignSize, StaticRows, StaticCols >

Base accessor class and version of template for both sizes known at compile time.

The actual container inherits from this class, this is to reduce the number of methods that need to be redefined with each size specialization.

Member Function Documentation

◆ begin() [1/2]

template<typename Index_t , class Scalar_t , StorageType Store, size_t AlignSize, size_t StaticRows, size_t StaticCols>
const Scalar_t * container_details::AccessorImpl< Index_t, Scalar_t, Store, AlignSize, StaticRows, StaticCols >::begin ( ) const
inlinenoexcept

◆ begin() [2/2]

template<typename Index_t , class Scalar_t , StorageType Store, size_t AlignSize, size_t StaticRows, size_t StaticCols>
Scalar_t * container_details::AccessorImpl< Index_t, Scalar_t, Store, AlignSize, StaticRows, StaticCols >::begin ( )
inlinenoexcept

◆ cols()

template<typename Index_t , class Scalar_t , StorageType Store, size_t AlignSize, size_t StaticRows, size_t StaticCols>
Index_t container_details::AccessorImpl< Index_t, Scalar_t, Store, AlignSize, StaticRows, StaticCols >::cols ( ) const
inlinenoexcept

◆ data() [1/2]

template<typename Index_t , class Scalar_t , StorageType Store, size_t AlignSize, size_t StaticRows, size_t StaticCols>
const Scalar_t * container_details::AccessorImpl< Index_t, Scalar_t, Store, AlignSize, StaticRows, StaticCols >::data ( ) const
inlinenoexcept

◆ data() [2/2]

template<typename Index_t , class Scalar_t , StorageType Store, size_t AlignSize, size_t StaticRows, size_t StaticCols>
Scalar_t * container_details::AccessorImpl< Index_t, Scalar_t, Store, AlignSize, StaticRows, StaticCols >::data ( )
inlinenoexcept

◆ empty()

template<typename Index_t , class Scalar_t , StorageType Store, size_t AlignSize, size_t StaticRows, size_t StaticCols>
bool container_details::AccessorImpl< Index_t, Scalar_t, Store, AlignSize, StaticRows, StaticCols >::empty ( ) const
inlinenoexcept

◆ end() [1/2]

template<typename Index_t , class Scalar_t , StorageType Store, size_t AlignSize, size_t StaticRows, size_t StaticCols>
const Scalar_t * container_details::AccessorImpl< Index_t, Scalar_t, Store, AlignSize, StaticRows, StaticCols >::end ( ) const
inlinenoexcept

◆ end() [2/2]

template<typename Index_t , class Scalar_t , StorageType Store, size_t AlignSize, size_t StaticRows, size_t StaticCols>
Scalar_t * container_details::AccessorImpl< Index_t, Scalar_t, Store, AlignSize, StaticRows, StaticCols >::end ( )
inlinenoexcept

◆ m_allocate()

template<typename Index_t , class Scalar_t , StorageType Store, size_t AlignSize, size_t StaticRows, size_t StaticCols>
void container_details::AccessorImpl< Index_t, Scalar_t, Store, AlignSize, StaticRows, StaticCols >::m_allocate ( size_t  sz,
Index_t  rows,
Index_t  cols 
)
inlineprotectednoexcept

◆ m_destroy()

template<typename Index_t , class Scalar_t , StorageType Store, size_t AlignSize, size_t StaticRows, size_t StaticCols>
void container_details::AccessorImpl< Index_t, Scalar_t, Store, AlignSize, StaticRows, StaticCols >::m_destroy ( )
inlineprotectednoexcept

◆ operator()() [1/2]

template<typename Index_t , class Scalar_t , StorageType Store, size_t AlignSize, size_t StaticRows, size_t StaticCols>
const Scalar_t & container_details::AccessorImpl< Index_t, Scalar_t, Store, AlignSize, StaticRows, StaticCols >::operator() ( const Index_t  i,
const Index_t  j 
) const
inlinenoexcept

◆ operator()() [2/2]

template<typename Index_t , class Scalar_t , StorageType Store, size_t AlignSize, size_t StaticRows, size_t StaticCols>
Scalar_t & container_details::AccessorImpl< Index_t, Scalar_t, Store, AlignSize, StaticRows, StaticCols >::operator() ( const Index_t  i,
const Index_t  j 
)
inlinenoexcept

◆ operator[]() [1/2]

template<typename Index_t , class Scalar_t , StorageType Store, size_t AlignSize, size_t StaticRows, size_t StaticCols>
const Scalar_t * container_details::AccessorImpl< Index_t, Scalar_t, Store, AlignSize, StaticRows, StaticCols >::operator[] ( const Index_t  k) const
inlinenoexcept

◆ operator[]() [2/2]

template<typename Index_t , class Scalar_t , StorageType Store, size_t AlignSize, size_t StaticRows, size_t StaticCols>
Scalar_t * container_details::AccessorImpl< Index_t, Scalar_t, Store, AlignSize, StaticRows, StaticCols >::operator[] ( const Index_t  k)
inlinenoexcept

◆ rows()

template<typename Index_t , class Scalar_t , StorageType Store, size_t AlignSize, size_t StaticRows, size_t StaticCols>
Index_t container_details::AccessorImpl< Index_t, Scalar_t, Store, AlignSize, StaticRows, StaticCols >::rows ( ) const
inlinenoexcept

◆ size()

template<typename Index_t , class Scalar_t , StorageType Store, size_t AlignSize, size_t StaticRows, size_t StaticCols>
size_t container_details::AccessorImpl< Index_t, Scalar_t, Store, AlignSize, StaticRows, StaticCols >::size ( ) const
inlinenoexcept

Member Data Documentation

◆ m_data

template<typename Index_t , class Scalar_t , StorageType Store, size_t AlignSize, size_t StaticRows, size_t StaticCols>
Scalar_t container_details::AccessorImpl< Index_t, Scalar_t, Store, AlignSize, StaticRows, StaticCols >::m_data[StaticRows *StaticCols]
protected

For static specializations AlignSize will force the alignment specification of the entire class, not just the data.


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