FLAMES 0.1.0
Matrix-Empowered HLS Library
flames::MatViewT< T, n_rows, n_cols, type > Class Template Reference

Read only view version of a transposed matrix. More...

#include <core.hpp>

Public Member Functions

 MatViewT (const Mat< T, n_cols, n_rows, tType(type)> &m)
 Construct a new MatViewT object from raw data pointer. More...
 
 MatViewT (Mat< T, n_cols, n_rows, tType(type)> &m)
 
 MatViewT (const MatViewT &m)
 Copy constructor. More...
 
 MatViewT (T *ptr)
 
operator() (size_t r, size_t c) const
 Get the read only data element from row and column index. More...
 
operator[] (size_t index) const
 Get the read only element by array row major index. More...
 
 operator Mat< T, n_rows, n_cols, type > () const
 Conversion from view to a real Mat. More...
 
Mat< T, n_rows, n_cols, type > asMat () const
 Explicitly make a Mat copy. More...
 

Static Public Member Functions

static constexpr size_t size () noexcept
 The data element number. More...
 

Public Attributes

T *const _data
 Raw data pointer. More...
 

Detailed Description

template<typename T, size_t n_rows, size_t n_cols, MatType type>
class flames::MatViewT< T, n_rows, n_cols, type >

Read only view version of a transposed matrix.

Template Parameters
TElement type.
n_rowsNumber of rows.
n_colsNumber of columns.
typeMatrix type.

Constructor & Destructor Documentation

◆ MatViewT() [1/4]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
flames::MatViewT< T, n_rows, n_cols, type >::MatViewT ( const Mat< T, n_cols, n_rows, tType(type)> &  m)
inline

Construct a new MatViewT object from raw data pointer.

Parameters
mThe original matrix.

◆ MatViewT() [2/4]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
flames::MatViewT< T, n_rows, n_cols, type >::MatViewT ( Mat< T, n_cols, n_rows, tType(type)> &  m)
inline

◆ MatViewT() [3/4]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
flames::MatViewT< T, n_rows, n_cols, type >::MatViewT ( const MatViewT< T, n_rows, n_cols, type > &  m)
inline

Copy constructor.

Parameters
mAnother MatViewT object.

◆ MatViewT() [4/4]

template<typename T , size_t n_rows, size_t n_cols, MatType type>
flames::MatViewT< T, n_rows, n_cols, type >::MatViewT ( T *  ptr)
inline

Member Function Documentation

◆ asMat()

template<typename T , size_t n_rows, size_t n_cols, MatType type>
Mat< T, n_rows, n_cols, type > flames::MatViewT< T, n_rows, n_cols, type >::asMat ( ) const
inline

Explicitly make a Mat copy.

Returns
(Mat<T, n_rows, n_cols, type>) The real Mat.

◆ operator Mat< T, n_rows, n_cols, type >()

template<typename T , size_t n_rows, size_t n_cols, MatType type>
flames::MatViewT< T, n_rows, n_cols, type >::operator Mat< T, n_rows, n_cols, type > ( ) const
inline

Conversion from view to a real Mat.

Returns
(Mat<T, n_rows, n_cols, type>) The real Mat.

◆ operator()()

template<typename T , size_t n_rows, size_t n_cols, MatType type>
T flames::MatViewT< T, n_rows, n_cols, type >::operator() ( size_t  r,
size_t  c 
) const
inline

Get the read only data element from row and column index.

Parameters
rThe row index.
cThe column index.
Returns
(T) The element value.

◆ operator[]()

template<typename T , size_t n_rows, size_t n_cols, MatType type>
T flames::MatViewT< T, n_rows, n_cols, type >::operator[] ( size_t  index) const
inline

Get the read only element by array row major index.

Parameters
indexThe index.
Returns
(T) The data.
Here is the call graph for this function:

◆ size()

template<typename T , size_t n_rows, size_t n_cols, MatType type>
static constexpr size_t flames::MatViewT< T, n_rows, n_cols, type >::size ( )
inlinestaticconstexprnoexcept

The data element number.

Returns
(constexpr size_t) The size.

Member Data Documentation

◆ _data

template<typename T , size_t n_rows, size_t n_cols, MatType type>
T* const flames::MatViewT< T, n_rows, n_cols, type >::_data

Raw data pointer.

Note
This contents will not be modified.

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