FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ > Class Template Reference

Tiny Tensor3 class template. More...

#include <tiny_algebra.hpp>

Public Types

typedef Intern::DataTypeExtractor< ValueType >::MyDataType DataType
 The basic data type buried in the lowest level of the vector. More...
 
typedef Matrix< T_, m_, n_, sm_, sn_ > PlaneType
 Type of tensor data; that's an array of matrices. More...
 
typedef T_ ValueType
 the data type of the tensor More...
 

Public Member Functions

CUDA_HOST_DEVICE Tensor3 ()
 default constructor More...
 
template<typename Tx_ >
CUDA_HOST_DEVICE Tensor3 (const std::initializer_list< std::initializer_list< std::initializer_list< Tx_ > > > &x)
 Initializer list constructor. More...
 
template<typename Tx_ >
CUDA_HOST_DEVICE Tensor3 (const std::initializer_list< Tx_ > &x)
 Initializer list constructor. More...
 
template<int sla_, int sma_, int sna_>
CUDA_HOST_DEVICE Tensor3 (const Tensor3< T_, l_, m_, n_, sla_, sma_, sna_ > &a)
 copy-constructor More...
 
CUDA_HOST_DEVICE Tensor3 (DataType value)
 value-assignment constructor More...
 
template<int lt_, int mt_, int nt_, int slt_, int smt_, int snt_, int smb_, int snb_, int smd_, int snd_>
CUDA_HOST_DEVICE Tensor3add_double_mat_mult (const Tensor3< T_, lt_, mt_, nt_, slt_, smt_, snt_ > &t, const Matrix< T_, nt_, n_, smb_, snb_ > &b, const Matrix< T_, mt_, m_, smd_, snd_ > &d, DataType alpha=DataType(1))
 Adds the result of a matrix-tensor-matrix double-product onto this tensor. More...
 
template<int k_, int sma_, int sna_, int slt_, int smt_, int snt_>
CUDA_HOST_DEVICE Tensor3add_mat_tensor_mult (const Matrix< T_, l_, k_, sma_, sna_ > &a, const Tensor3< T_, k_, m_, n_, slt_, smt_, snt_ > &t, DataType alpha=DataType(1))
 Adds the result of a matrix-tensor product onto this tensor. More...
 
template<int slx_, int sma_, int sna_>
CUDA_HOST_DEVICE Tensor3add_vec_mat_outer_product (const Vector< T_, l_, slx_ > &x, const Matrix< T_, m_, n_, sma_, sna_ > &a, DataType alpha=DataType(1))
 Adds the result of a vector-matrix outer product onto this tensor. More...
 
template<typename Tx_ , int sla_, int sma_, int sna_>
CUDA_HOST_DEVICE void convert (const Tensor3< Tx_, l_, m_, n_, sla_, sma_, sna_ > &a)
 conversion operator More...
 
template<int sla_, int sma_, int sna_>
CUDA_HOST_DEVICE void copy (const Tensor3< T_, l_, m_, n_, sla_, sma_, sna_ > &a)
 Copies a tensor3. More...
 
template<int ll_, int mm_, int nn_, int la_, int ma_, int na_, int sla_, int sma_, int sna_>
CUDA_HOST_DEVICE void copy_n (const Tensor3< T_, la_, ma_, na_, sla_, sma_, sna_ > &a)
 Copies the upper left mm_ x nn_ entries of a matrix. More...
 
CUDA_HOST_DEVICE void format (DataType alpha=DataType(0))
 formats the tensor More...
 
CUDA_HOST_DEVICE T_ & operator() (int h, int i, int j)
 Access operator. More...
 
CUDA_HOST_DEVICE const T_ & operator() (int h, int i, int j) const
 Access operator. More...
 
CUDA_HOST_DEVICE Tensor3operator*= (DataType alpha)
 scalar right-multiply-by operator More...
 
template<int sla_, int sma_, int sna_>
CUDA_HOST_DEVICE Tensor3operator+= (const Tensor3< T_, l_, m_, n_, sla_, sma_, sna_ > &a)
 tensor component-wise addition operator More...
 
template<int sla_, int sma_, int sna_>
CUDA_HOST_DEVICE Tensor3operator-= (const Tensor3< T_, l_, m_, n_, sla_, sma_, sna_ > &a)
 tensor component-wise subtraction operator More...
 
template<typename Tx_ >
CUDA_HOST_DEVICE Tensor3operator= (const std::initializer_list< std::initializer_list< std::initializer_list< Tx_ > > > &x)
 Initializer list assignment operator. More...
 
template<typename Tx_ >
CUDA_HOST_DEVICE Tensor3operator= (const std::initializer_list< Tx_ > &x)
 Initializer list assignment operator. More...
 
template<int sla_, int sma_, int sna_>
CUDA_HOST_DEVICE Tensor3operator= (const Tensor3< T_, l_, m_, n_, sla_, sma_, sna_ > &a)
 copy-assignment operator More...
 
CUDA_HOST_DEVICE Tensor3operator= (DataType value)
 value-assignment operator More...
 
CUDA_HOST_DEVICE PlaneTypeoperator[] (int h)
 Plane-Access operator. More...
 
CUDA_HOST_DEVICE const PlaneTypeoperator[] (int h) const
 Plane-Access operator. More...
 

Static Public Member Functions

static CUDA_HOST_DEVICE Tensor3 null ()
 Returns a null-tensor. More...
 

Public Attributes

PlaneType v [sl_]
 Actual tensor data. More...
 

Static Public Attributes

static constexpr int l = l_
 the tube count of the tensor More...
 
static constexpr int m = m_
 the row count of the tensor More...
 
static constexpr int n = n_
 the column count of the tensor More...
 
static constexpr int sl = sl_
 the tube stride of the tensor More...
 
static constexpr int sm = sm_
 the row stride of the tensor More...
 
static constexpr int sn = sn_
 the column stride of the tensor More...
 

Detailed Description

template<typename T_, int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
class FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >

Tiny Tensor3 class template.

This class template implements a 3rd-order tensor whose datatype and sizes are given at compile-time. This class template implements a 3rd order tensor whose value type and size is given at compile-time. The value type can be a primitive type, or some other object like a Vector.

Technically, the Tensor3 class template realizes a l-tuple of m-by-n matrices.

Template Parameters
T_The datatype that the vector shall contain.
l_,m_,n_The number tubes, rows and columns of the tensor. Must be > 0.
sl_,Thetube stride of the tensor. Must be >= l_.
sm_The row stride of the tensor. Must be >= m_.
sn_The column stride of the tensor. Must be >= n_.
Author
Peter Zajac

Definition at line 116 of file tiny_algebra.hpp.

Member Typedef Documentation

◆ DataType

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
typedef Intern::DataTypeExtractor<ValueType>::MyDataType FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::DataType

The basic data type buried in the lowest level of the vector.

Definition at line 2497 of file tiny_algebra.hpp.

◆ PlaneType

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
typedef Matrix<T_, m_, n_, sm_, sn_> FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::PlaneType

Type of tensor data; that's an array of matrices.

Definition at line 2500 of file tiny_algebra.hpp.

◆ ValueType

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
typedef T_ FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::ValueType

the data type of the tensor

Definition at line 2495 of file tiny_algebra.hpp.

Constructor & Destructor Documentation

◆ Tensor3() [1/5]

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
CUDA_HOST_DEVICE FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::Tensor3 ( )
inline

default constructor

Definition at line 2505 of file tiny_algebra.hpp.

Referenced by FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::null().

◆ Tensor3() [2/5]

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
CUDA_HOST_DEVICE FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::Tensor3 ( DataType  value)
inlineexplicit

value-assignment constructor

Definition at line 2510 of file tiny_algebra.hpp.

References FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::v, and FEAT::value.

◆ Tensor3() [3/5]

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
template<typename Tx_ >
CUDA_HOST_DEVICE FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::Tensor3 ( const std::initializer_list< Tx_ > &  x)
inlineexplicit

Initializer list constructor.

Parameters
[in]xThe initializer list whose elements are to be assigned.

Definition at line 2523 of file tiny_algebra.hpp.

References FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::v, and XASSERTM.

◆ Tensor3() [4/5]

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
template<typename Tx_ >
CUDA_HOST_DEVICE FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::Tensor3 ( const std::initializer_list< std::initializer_list< std::initializer_list< Tx_ > > > &  x)
inlineexplicit

Initializer list constructor.

Parameters
[in]xThe initializer list whose elements are to be assigned.

Definition at line 2538 of file tiny_algebra.hpp.

References FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::v, and XASSERTM.

◆ Tensor3() [5/5]

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
template<int sla_, int sma_, int sna_>
CUDA_HOST_DEVICE FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::Tensor3 ( const Tensor3< T_, l_, m_, n_, sla_, sma_, sna_ > &  a)
inline

copy-constructor

Definition at line 2548 of file tiny_algebra.hpp.

References FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::v.

Member Function Documentation

◆ add_double_mat_mult()

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
template<int lt_, int mt_, int nt_, int slt_, int smt_, int snt_, int smb_, int snb_, int smd_, int snd_>
CUDA_HOST_DEVICE Tensor3 & FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::add_double_mat_mult ( const Tensor3< T_, lt_, mt_, nt_, slt_, smt_, snt_ > &  t,
const Matrix< T_, nt_, n_, smb_, snb_ > &  b,
const Matrix< T_, mt_, m_, smd_, snd_ > &  d,
DataType  alpha = DataType(1) 
)
inline

Adds the result of a matrix-tensor-matrix double-product onto this tensor.

Let K denote this l-by-m-by-n tensor, T the l-by-m'-by-n' input tensor, B the m'-by-m and D the n'-by-n input matrices, then this operation computes:

\[ \forall h\in\{0,...,l-1\}, i\in\{0,...,m-1\}, j\in\{0,...,n-1\}:~ K_{hij} \leftarrow K_{hij} + \alpha \sum_{p=0}^{m'-1}\sum_{q=0}^{n'-1} T_{hpq}\cdot B_{pi}\cdot D_{qj} \]

Note
This function is used for the computation of second-order derivatives by the chain rule.
Parameters
[in]tThe l-by-m'-by-n' tensor that serves as the inner multiplicand.
[in]bThe m'-by-m matrix that serves as the left multiplicand.
[in]dThe n'-by-n matrix that serves as the right multiplicand.
[in]alphaA scaling factor for the product.
Returns
*this

Definition at line 2812 of file tiny_algebra.hpp.

References ASSERTM, and FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::operator()().

◆ add_mat_tensor_mult()

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
template<int k_, int sma_, int sna_, int slt_, int smt_, int snt_>
CUDA_HOST_DEVICE Tensor3 & FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::add_mat_tensor_mult ( const Matrix< T_, l_, k_, sma_, sna_ > &  a,
const Tensor3< T_, k_, m_, n_, slt_, smt_, snt_ > &  t,
DataType  alpha = DataType(1) 
)
inline

Adds the result of a matrix-tensor product onto this tensor.

Let K denote this tensor, A the input matrix and T the input tensor, then this operation computes:

\[ \forall h\in\{0,...,l-1\}, i\in\{0,...,m-1\},j\in\{0,...,n-1\}:~ K_{hij} \leftarrow K_{hij} + \alpha \sum_{p=0}^{k-1} A_{hp}\cdot T_{pij}\]

Note
This function is used for the computation of second-order derivatives by the chain rule.
Parameters
[in]aThe l-by-k matrix that serves as the left multiplicand.
[in]tThe k-by-m-by-n tensor that serves as the right multiplicand.
[in]alphaA scaling factor for the product.
Returns
*this

Definition at line 2758 of file tiny_algebra.hpp.

References ASSERTM, and FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::operator()().

◆ add_vec_mat_outer_product()

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
template<int slx_, int sma_, int sna_>
CUDA_HOST_DEVICE Tensor3 & FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::add_vec_mat_outer_product ( const Vector< T_, l_, slx_ > &  x,
const Matrix< T_, m_, n_, sma_, sna_ > &  a,
DataType  alpha = DataType(1) 
)
inline

Adds the result of a vector-matrix outer product onto this tensor.

Let K denote this tensor, x the input vector and A the input matrix, then this operation computes:

\[ \forall h\in\{0,...,l-1\}, i\in\{0,...,m-1\},j\in\{0,...,n-1\}:~ K_{hij} \leftarrow K_{hij} + \alpha x_h A_{ij}\]

Note
This function is used for the computation of vector-valued hessian tensors.
Parameters
[in]xThe l-length vector that serves as the left multiplicand.
[in]aThe m-by-n matrix that serves as the right multiplicand.
[in]alphaA scaling factor for the product.
Returns
*this

Definition at line 2863 of file tiny_algebra.hpp.

References FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::operator()().

◆ convert()

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
template<typename Tx_ , int sla_, int sma_, int sna_>
CUDA_HOST_DEVICE void FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::convert ( const Tensor3< Tx_, l_, m_, n_, sla_, sma_, sna_ > &  a)
inline

◆ copy()

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
template<int sla_, int sma_, int sna_>
CUDA_HOST_DEVICE void FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::copy ( const Tensor3< T_, l_, m_, n_, sla_, sma_, sna_ > &  a)
inline

Copies a tensor3.

Parameters
[in]aThe source tensor3 to copy

Definition at line 2696 of file tiny_algebra.hpp.

References FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::v, and FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::v.

◆ copy_n()

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
template<int ll_, int mm_, int nn_, int la_, int ma_, int na_, int sla_, int sma_, int sna_>
CUDA_HOST_DEVICE void FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::copy_n ( const Tensor3< T_, la_, ma_, na_, sla_, sma_, sna_ > &  a)
inline

Copies the upper left mm_ x nn_ entries of a matrix.

Template Parameters
mm_The number of matrix rows to copy; must be mm_ <= min(m_, ma_)
nn_The number of matrix columns to copy; must be nn_ <= min(n_, na_)
Parameters
[in]xThe source vector to copy the elements from

Definition at line 2717 of file tiny_algebra.hpp.

References FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::v, and FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::v.

◆ format()

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
CUDA_HOST_DEVICE void FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::format ( DataType  alpha = DataType(0))
inline

formats the tensor

Definition at line 2732 of file tiny_algebra.hpp.

◆ null()

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
static CUDA_HOST_DEVICE Tensor3 FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::null ( )
inlinestatic

Returns a null-tensor.

Definition at line 2884 of file tiny_algebra.hpp.

References FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::Tensor3().

◆ operator()() [1/2]

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
CUDA_HOST_DEVICE T_ & FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::operator() ( int  h,
int  i,
int  j 
)
inline

Access operator.

Parameters
[in]h,i,jThe indices of the tensor entry that is to be returned.
Returns
A (const) reference to the tensor entry at position (h,i,j).

Definition at line 2624 of file tiny_algebra.hpp.

References ASSERTM, and FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::v.

Referenced by FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::add_double_mat_mult(), FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::add_mat_tensor_mult(), and FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::add_vec_mat_outer_product().

◆ operator()() [2/2]

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
CUDA_HOST_DEVICE const T_ & FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::operator() ( int  h,
int  i,
int  j 
) const
inline

Access operator.

Parameters
[in]h,i,jThe indices of the tensor entry that is to be returned.
Returns
A (const) reference to the tensor entry at position (h,i,j).

Definition at line 2633 of file tiny_algebra.hpp.

References ASSERTM, and FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::v.

◆ operator*=()

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
CUDA_HOST_DEVICE Tensor3 & FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::operator*= ( DataType  alpha)
inline

scalar right-multiply-by operator

Definition at line 2664 of file tiny_algebra.hpp.

References FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::v.

◆ operator+=()

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
template<int sla_, int sma_, int sna_>
CUDA_HOST_DEVICE Tensor3 & FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::operator+= ( const Tensor3< T_, l_, m_, n_, sla_, sma_, sna_ > &  a)
inline

tensor component-wise addition operator

Definition at line 2673 of file tiny_algebra.hpp.

References FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::v, and FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::v.

◆ operator-=()

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
template<int sla_, int sma_, int sna_>
CUDA_HOST_DEVICE Tensor3 & FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::operator-= ( const Tensor3< T_, l_, m_, n_, sla_, sma_, sna_ > &  a)
inline

tensor component-wise subtraction operator

Definition at line 2682 of file tiny_algebra.hpp.

References FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::v, and FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::v.

◆ operator=() [1/4]

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
template<typename Tx_ >
CUDA_HOST_DEVICE Tensor3 & FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::operator= ( const std::initializer_list< std::initializer_list< std::initializer_list< Tx_ > > > &  x)
inline

Initializer list assignment operator.

Parameters
[in]xThe initializer list whose elements are to be assigned.
Returns
*this

Definition at line 2598 of file tiny_algebra.hpp.

References FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::v, and XASSERTM.

◆ operator=() [2/4]

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
template<typename Tx_ >
CUDA_HOST_DEVICE Tensor3 & FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::operator= ( const std::initializer_list< Tx_ > &  x)
inline

Initializer list assignment operator.

Parameters
[in]xThe initializer list whose elements are to be assigned.
Returns
*this

Definition at line 2580 of file tiny_algebra.hpp.

References FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::v, and XASSERTM.

◆ operator=() [3/4]

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
template<int sla_, int sma_, int sna_>
CUDA_HOST_DEVICE Tensor3 & FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::operator= ( const Tensor3< T_, l_, m_, n_, sla_, sma_, sna_ > &  a)
inline

◆ operator=() [4/4]

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
CUDA_HOST_DEVICE Tensor3 & FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::operator= ( DataType  value)
inline

value-assignment operator

Definition at line 2555 of file tiny_algebra.hpp.

References FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::v, and FEAT::value.

◆ operator[]() [1/2]

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
CUDA_HOST_DEVICE PlaneType & FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::operator[] ( int  h)
inline

Plane-Access operator.

Parameters
[in]hThe index of the plane that is to be returned.
Returns
A (const) reference to the matrix representing the h-th plane of the tensor.

Definition at line 2650 of file tiny_algebra.hpp.

References ASSERTM, and FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::v.

◆ operator[]() [2/2]

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
CUDA_HOST_DEVICE const PlaneType & FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::operator[] ( int  h) const
inline

Plane-Access operator.

Parameters
[in]hThe index of the plane that is to be returned.
Returns
A (const) reference to the matrix representing the h-th plane of the tensor.

Definition at line 2657 of file tiny_algebra.hpp.

References ASSERTM, and FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::v.

Member Data Documentation

◆ l

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
constexpr int FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::l = l_
staticconstexpr

the tube count of the tensor

Definition at line 2482 of file tiny_algebra.hpp.

◆ m

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
constexpr int FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::m = m_
staticconstexpr

the row count of the tensor

Definition at line 2484 of file tiny_algebra.hpp.

◆ n

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
constexpr int FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::n = n_
staticconstexpr

the column count of the tensor

Definition at line 2486 of file tiny_algebra.hpp.

◆ sl

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
constexpr int FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::sl = sl_
staticconstexpr

the tube stride of the tensor

Definition at line 2488 of file tiny_algebra.hpp.

◆ sm

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
constexpr int FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::sm = sm_
staticconstexpr

the row stride of the tensor

Definition at line 2490 of file tiny_algebra.hpp.

◆ sn

template<typename T_ , int l_, int m_, int n_, int sl_ = l_, int sm_ = m_, int sn_ = n_>
constexpr int FEAT::Tiny::Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::sn = sn_
staticconstexpr

the column stride of the tensor

Definition at line 2492 of file tiny_algebra.hpp.

◆ v


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