Documentation 6b54b78464
Loading...
Searching...
No Matches
CMatrixView< T > Class Template Reference

Class to represent a matrix (without owning the data, this just wraps a pointer). More...

#include <container_decorators.hpp>

Inheritance diagram for CMatrixView< T >:
[legend]

Public Types

using Scalar = typename std::remove_const< T >::type
 
using Index = unsigned long
 

Public Member Functions

 CMatrixView (T *ptr=nullptr, Index cols=0)
 
template<class U >
 CMatrixView (const CMatrixView< U > &other)
 
 CMatrixView (su2matrix< Scalar > &mat)
 
template<class U = T, su2enable_if< std::is_const< U >::value > = 0>
 CMatrixView (const su2matrix< Scalar > &mat)
 
const Scalar * operator[] (Index i) const noexcept
 
const Scalar & operator() (Index i, Index j) const noexcept
 
template<class StaticContainer >
StaticContainer get (Index i, Index start=0) const noexcept
 Return copy of data in a static size container (see C2DContainer::get).
 
template<class StaticContainer , class U , size_t N>
StaticContainer get (simd::Array< U, N > i, Index start=0) const noexcept
 SIMD gather version of get, one row per lane.
 
template<class U = T, su2enable_if<!std::is_const< U >::value > = 0>
Scalar * operator[] (Index i) noexcept
 
template<class U = T, su2enable_if<!std::is_const< U >::value > = 0>
Scalar & operator() (Index i, Index j) noexcept
 

Friends

template<class U >
class CMatrixView
 
CMatrixView operator+ (CMatrixView mv, Index incr)
 

Detailed Description

template<class T>
class CMatrixView< T >

Class to represent a matrix (without owning the data, this just wraps a pointer).

Member Typedef Documentation

◆ Index

template<class T >
using CMatrixView< T >::Index = unsigned long

◆ Scalar

template<class T >
using CMatrixView< T >::Scalar = typename std::remove_const<T>::type

Constructor & Destructor Documentation

◆ CMatrixView() [1/4]

template<class T >
CMatrixView< T >::CMatrixView ( T *  ptr = nullptr,
Index  cols = 0 
)
inline

◆ CMatrixView() [2/4]

template<class T >
template<class U >
CMatrixView< T >::CMatrixView ( const CMatrixView< U > &  other)
inline

◆ CMatrixView() [3/4]

template<class T >
CMatrixView< T >::CMatrixView ( su2matrix< Scalar > &  mat)
inlineexplicit

◆ CMatrixView() [4/4]

template<class T >
template<class U = T, su2enable_if< std::is_const< U >::value > = 0>
CMatrixView< T >::CMatrixView ( const su2matrix< Scalar > &  mat)
inlineexplicit

Member Function Documentation

◆ get() [1/2]

template<class T >
template<class StaticContainer >
StaticContainer CMatrixView< T >::get ( Index  i,
Index  start = 0 
) const
inlinenoexcept

Return copy of data in a static size container (see C2DContainer::get).

Parameters
[in]i- Row of the view (e.g. point index, whole-mesh usage).
[in]start- Starting column to copy the data (amount determined by container size).

◆ get() [2/2]

template<class T >
template<class StaticContainer , class U , size_t N>
StaticContainer CMatrixView< T >::get ( simd::Array< U, N >  i,
Index  start = 0 
) const
inlinenoexcept

SIMD gather version of get, one row per lane.

◆ operator()() [1/2]

template<class T >
const Scalar & CMatrixView< T >::operator() ( Index  i,
Index  j 
) const
inlinenoexcept

◆ operator()() [2/2]

template<class T >
template<class U = T, su2enable_if<!std::is_const< U >::value > = 0>
Scalar & CMatrixView< T >::operator() ( Index  i,
Index  j 
)
inlinenoexcept

◆ operator[]() [1/2]

template<class T >
const Scalar * CMatrixView< T >::operator[] ( Index  i) const
inlinenoexcept

◆ operator[]() [2/2]

template<class T >
template<class U = T, su2enable_if<!std::is_const< U >::value > = 0>
Scalar * CMatrixView< T >::operator[] ( Index  i)
inlinenoexcept

Friends And Related Symbol Documentation

◆ CMatrixView

template<class T >
template<class U >
friend class CMatrixView
friend

◆ operator+

template<class T >
CMatrixView operator+ ( CMatrixView< T >  mv,
Index  incr 
)
friend

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