FLAMES 0.1.0
Matrix-Empowered HLS Library
Loading...
Searching...
No Matches
flames::MatViewOpp< T, n_rows, n_cols, type > Class Template Reference

Read only view version of the opposite of a matrix. More...

#include <core.hpp>

Public Member Functions

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

Static Public Member Functions

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

Public Attributes

const T * _data
 

Detailed Description

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

Read only view version of the opposite of a matrix.

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

Constructor & Destructor Documentation

◆ MatViewOpp() [1/2]

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

Construct a new MatViewOpp object from raw data pointer.

Parameters
mThe original matrix.

◆ MatViewOpp() [2/2]

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

Copy constructor.

Parameters
mAnother MatViewOpp object.

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::MatViewOpp< 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::MatViewOpp< 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::MatViewOpp< 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::MatViewOpp< 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::MatViewOpp< T, n_rows, n_cols, type >::size ( )
inlinestaticconstexprnoexcept

The data element number.

Returns
(constexpr size_t) The size.
Here is the caller graph for this function:

Member Data Documentation

◆ _data

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

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