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

#include <core.hpp>

Public Member Functions

 MatRefRow (Mat< T, n_rows, n_cols, matType< type_parent >()> &m, size_t index)
 Construct a new MatRefRow object from raw data pointer. More...
 
 MatRefRow (const MatRefRow &m)
 Copy constructor. More...
 
template<typename T_ , size_t n_rows_, size_t n_cols_, MatType type_>
MatRefRowoperator= (const Mat< T_, n_rows_, n_cols_, type_ > &m)
 
template<typename M >
void assign (M m)
 
operator() (size_t r, size_t c) const
 Get the read only data element from row and column index. More...
 
T & operator() (size_t r, size_t c)
 
operator[] (size_t index) const
 Get the read only element by array row major index. More...
 
T & operator[] (size_t index)
 
 operator RowVec< T, n_cols > () const
 Conversion from view to a real Mat. More...
 
RowVec< T, n_cols > asMat () const
 Explicitly make a Mat copy. More...
 
RowVec< T, n_cols > asVec () const
 Explicitly make a Mat (RowVec) copy. More...
 
void print (const std::string &str="", std::ostream &os=std::cout) const
 

Static Public Member Functions

static constexpr size_t size () noexcept
 The data element number. More...
 
static constexpr MatType pType () noexcept
 Parent matrix as MatType. More...
 

Public Attributes

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

Constructor & Destructor Documentation

◆ MatRefRow() [1/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
flames::MatRefRow< T, n_rows, n_cols, type, type_parent >::MatRefRow ( Mat< T, n_rows, n_cols, matType< type_parent >()> &  m,
size_t  index 
)
inline

Construct a new MatRefRow object from raw data pointer.

Parameters
mThe original matrix.

◆ MatRefRow() [2/2]

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

Copy constructor.

Parameters
mAnother MatRefRow object.

Member Function Documentation

◆ asMat()

template<typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
RowVec< T, n_cols > flames::MatRefRow< T, n_rows, n_cols, type, type_parent >::asMat ( ) const
inline

Explicitly make a Mat copy.

Returns
(RowVec<T, n_cols>) The real Mat.
Here is the caller graph for this function:

◆ assign()

template<typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
template<typename M >
void flames::MatRefRow< T, n_rows, n_cols, type, type_parent >::assign ( M  m)
inline
Here is the call graph for this function:

◆ asVec()

template<typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
RowVec< T, n_cols > flames::MatRefRow< T, n_rows, n_cols, type, type_parent >::asVec ( ) const
inline

Explicitly make a Mat (RowVec) copy.

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

◆ operator RowVec< T, n_cols >()

template<typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
flames::MatRefRow< T, n_rows, n_cols, type, type_parent >::operator RowVec< T, n_cols > ( ) const
inline

Conversion from view to a real Mat.

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

◆ operator()() [1/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
T & flames::MatRefRow< T, n_rows, n_cols, type, type_parent >::operator() ( size_t  r,
size_t  c 
)
inline
Here is the call graph for this function:

◆ operator()() [2/2]

template<typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
T flames::MatRefRow< T, n_rows, n_cols, type, type_parent >::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.
Here is the call graph for this function:

◆ operator=()

template<typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
template<typename T_ , size_t n_rows_, size_t n_cols_, MatType type_>
MatRefRow & flames::MatRefRow< T, n_rows, n_cols, type, type_parent >::operator= ( const Mat< T_, n_rows_, n_cols_, type_ > &  m)
inline
Here is the call graph for this function:

◆ operator[]() [1/2]

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

◆ operator[]() [2/2]

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

Get the read only element by array row major index.

Parameters
indexThe index.
Returns
(T) The data.

◆ print()

template<typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
void flames::MatRefRow< T, n_rows, n_cols, type, type_parent >::print ( const std::string &  str = "",
std::ostream &  os = std::cout 
) const
inline
Here is the call graph for this function:

◆ pType()

template<typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
static constexpr MatType flames::MatRefRow< T, n_rows, n_cols, type, type_parent >::pType ( )
inlinestaticconstexprnoexcept

Parent matrix as MatType.

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

◆ size()

template<typename T , size_t n_rows, size_t n_cols, MatType type, typename type_parent >
static constexpr size_t flames::MatRefRow< T, n_rows, n_cols, type, type_parent >::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, typename type_parent >
T* const flames::MatRefRow< T, n_rows, n_cols, type, type_parent >::_data

Raw data pointer.

Note
This contents will not be modified.

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