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

Tensor. More...

#include <tensor.hpp>

Public Types

using element_type = T
 
using value_type = T
 
using View = MatView<T, n_rows, n_cols, type>
 

Public Member Functions

 Tensor ()
 
View slice (size_t index) const
 
View slice (size_t index)
 
View operator[] (size_t index) const
 
View operator[] (size_t index)
 

Static Public Member Functions

static constexpr size_t matSize () noexcept
 
static constexpr size_t size () noexcept
 

Private Attributes

_data [type==MatType::NORMAL ? n_slices *n_rows *n_cols :type==MatType::DIAGONAL ? n_slices *n_rows :type==MatType::SCALAR ? n_slices *1 :type==MatType::SUPPER ? n_slices *(n_rows - 1) *n_rows/2 :type==MatType::SLOWER ? n_slices *(n_rows - 1) *n_rows/2 :type==MatType::ASYM ? n_slices *(n_rows - 1) *n_rows/2 :n_slices *(1+n_rows) *n_rows/2]
 

Detailed Description

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

Tensor.

3-D data structure.

Template Parameters
TElement type.
n_rowsNumber of rows.
n_colsNumber of columns.
n_slicesNumber of slices.
typematrix type.

Member Typedef Documentation

◆ element_type

template<typename T , size_t n_rows, size_t n_cols, size_t n_slices, MatType type>
using flames::Tensor< T, n_rows, n_cols, n_slices, type >::element_type = T

◆ value_type

template<typename T , size_t n_rows, size_t n_cols, size_t n_slices, MatType type>
using flames::Tensor< T, n_rows, n_cols, n_slices, type >::value_type = T

◆ View

template<typename T , size_t n_rows, size_t n_cols, size_t n_slices, MatType type>
using flames::Tensor< T, n_rows, n_cols, n_slices, type >::View = MatView<T, n_rows, n_cols, type>

Constructor & Destructor Documentation

◆ Tensor()

template<typename T , size_t n_rows, size_t n_cols, size_t n_slices, MatType type>
flames::Tensor< T, n_rows, n_cols, n_slices, type >::Tensor ( )
inline

Member Function Documentation

◆ matSize()

template<typename T , size_t n_rows, size_t n_cols, size_t n_slices, MatType type>
static constexpr size_t flames::Tensor< T, n_rows, n_cols, n_slices, type >::matSize ( )
inlinestaticconstexprnoexcept
Here is the caller graph for this function:

◆ operator[]() [1/2]

template<typename T , size_t n_rows, size_t n_cols, size_t n_slices, MatType type>
View flames::Tensor< T, n_rows, n_cols, n_slices, type >::operator[] ( size_t index)
inline
Here is the call graph for this function:

◆ operator[]() [2/2]

template<typename T , size_t n_rows, size_t n_cols, size_t n_slices, MatType type>
View flames::Tensor< T, n_rows, n_cols, n_slices, type >::operator[] ( size_t index) const
inline
Here is the call graph for this function:

◆ size()

template<typename T , size_t n_rows, size_t n_cols, size_t n_slices, MatType type>
static constexpr size_t flames::Tensor< T, n_rows, n_cols, n_slices, type >::size ( )
inlinestaticconstexprnoexcept
Here is the call graph for this function:
Here is the caller graph for this function:

◆ slice() [1/2]

template<typename T , size_t n_rows, size_t n_cols, size_t n_slices, MatType type>
View flames::Tensor< T, n_rows, n_cols, n_slices, type >::slice ( size_t index)
inline
Here is the call graph for this function:

◆ slice() [2/2]

template<typename T , size_t n_rows, size_t n_cols, size_t n_slices, MatType type>
View flames::Tensor< T, n_rows, n_cols, n_slices, type >::slice ( size_t index) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _data

template<typename T , size_t n_rows, size_t n_cols, size_t n_slices, MatType type>
T flames::Tensor< T, n_rows, n_cols, n_slices, type >::_data[type==MatType::NORMAL ? n_slices *n_rows *n_cols :type==MatType::DIAGONAL ? n_slices *n_rows :type==MatType::SCALAR ? n_slices *1 :type==MatType::SUPPER ? n_slices *(n_rows - 1) *n_rows/2 :type==MatType::SLOWER ? n_slices *(n_rows - 1) *n_rows/2 :type==MatType::ASYM ? n_slices *(n_rows - 1) *n_rows/2 :n_slices *(1+n_rows) *n_rows/2]
private

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