v0.8.15
Public Member Functions | Private Attributes | List of all members
FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k > Class Template Reference

#include <src/ftensor/src/FTensor/Tensor3/Tensor3_Expr.hpp>

Collaboration diagram for FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >:
[legend]

Public Member Functions

 Tensor3_Expr (Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > &a)
 
Toperator() (const int N1, const int N2, const int N3)
 
T operator() (const int N1, const int N2, const int N3) const
 
template<class B , class U , int Dim1_0, int Dim1_1, int Dim1_2, char i_1, char j_1, char k_1>
auto & equals (const Tensor3_Expr< B, U, Dim1_0, Dim1_1, Dim1_2, i_1, j_1, k_1 > &rhs)
 
template<class B , class U , int Dim1_0, int Dim1_1, int Dim1_2, char i_1, char j_1, char k_1>
auto & operator= (const Tensor3_Expr< B, U, Dim1_0, Dim1_1, Dim1_2, i_1, j_1, k_1 > &rhs)
 
auto & operator= (const Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k > &rhs)
 
template<class U >
Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k > & operator= (const U &u)
 
template<class B , class U , int Dim1_0, int Dim1_1, int Dim1_2, char i_1, char j_1, char k_1>
auto & operator+= (const Tensor3_Expr< B, U, Dim1_0, Dim1_1, Dim1_2, i_1, j_1, k_1 > &rhs)
 
auto & operator+= (const Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k > &rhs)
 

Private Attributes

Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > & iter
 

Detailed Description

template<class A, class T, int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int Dim0, int Dim1, int Dim2, char i, char j, char k>
class FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >

Definition at line 38 of file Tensor3_Expr.hpp.

Constructor & Destructor Documentation

◆ Tensor3_Expr()

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int Dim0, int Dim1, int Dim2, char i, char j, char k>
FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >::Tensor3_Expr ( Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > &  a)

Definition at line 44 of file Tensor3_Expr.hpp.

45  : iter(a)
46  {}

Member Function Documentation

◆ equals()

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int Dim0, int Dim1, int Dim2, char i, char j, char k>
template<class B , class U , int Dim1_0, int Dim1_1, int Dim1_2, char i_1, char j_1, char k_1>
auto& FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >::equals ( const Tensor3_Expr< B, U, Dim1_0, Dim1_1, Dim1_2, i_1, j_1, k_1 > &  rhs)

Definition at line 63 of file Tensor3_Expr.hpp.

64  {
65  for(int ii = 0; ii < Dim0; ++ii)
66  for(int jj = 0; jj < Dim1; ++jj)
67  for(int kk = 0; kk < Dim2; ++kk)
68  {
69  iter(ii, jj, kk) = permute(*this, rhs, ii, jj, kk);
70  }
71  return *this;
72  }
U permute(const Tensor2_Expr< A, T, Dim0_0, Dim0_1, i0, j0 > &, const Tensor2_Expr< B, U, Dim1_0, Dim1_1, i1, j1 > &rhs, const int N0, const int N1)
Definition: permute.hpp:11

◆ operator()() [1/2]

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int Dim0, int Dim1, int Dim2, char i, char j, char k>
T& FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >::operator() ( const int  N1,
const int  N2,
const int  N3 
)

Definition at line 47 of file Tensor3_Expr.hpp.

48  {
49  return iter(N1, N2, N3);
50  }

◆ operator()() [2/2]

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int Dim0, int Dim1, int Dim2, char i, char j, char k>
T FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >::operator() ( const int  N1,
const int  N2,
const int  N3 
) const

Definition at line 51 of file Tensor3_Expr.hpp.

52  {
53  return iter(N1, N2, N3);
54  }

◆ operator+=() [1/2]

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int Dim0, int Dim1, int Dim2, char i, char j, char k>
template<class B , class U , int Dim1_0, int Dim1_1, int Dim1_2, char i_1, char j_1, char k_1>
auto& FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >::operator+= ( const Tensor3_Expr< B, U, Dim1_0, Dim1_1, Dim1_2, i_1, j_1, k_1 > &  rhs)

Definition at line 105 of file Tensor3_Expr.hpp.

106  {
107  for (int ii = 0; ii < Dim0; ++ii)
108  for (int jj = 0; jj < Dim1; ++jj)
109  for (int kk = 0; kk < Dim2; ++kk) {
110  iter(ii, jj, kk) += permute(*this, rhs, ii, jj, kk);
111  }
112  return *this;
113  }
U permute(const Tensor2_Expr< A, T, Dim0_0, Dim0_1, i0, j0 > &, const Tensor2_Expr< B, U, Dim1_0, Dim1_1, i1, j1 > &rhs, const int N0, const int N1)
Definition: permute.hpp:11

◆ operator+=() [2/2]

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int Dim0, int Dim1, int Dim2, char i, char j, char k>
auto& FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >::operator+= ( const Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k > &  rhs)

Definition at line 115 of file Tensor3_Expr.hpp.

117  {
118  for (int ii = 0; ii < Dim0; ++ii)
119  for (int jj = 0; jj < Dim1; ++jj)
120  for (int kk = 0; kk < Dim2; ++kk) {
121  iter(ii, jj, kk) += permute(*this, rhs, ii, jj, kk);
122  }
123  return *this;
124  }
U permute(const Tensor2_Expr< A, T, Dim0_0, Dim0_1, i0, j0 > &, const Tensor2_Expr< B, U, Dim1_0, Dim1_1, i1, j1 > &rhs, const int N0, const int N1)
Definition: permute.hpp:11

◆ operator=() [1/3]

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int Dim0, int Dim1, int Dim2, char i, char j, char k>
template<class B , class U , int Dim1_0, int Dim1_1, int Dim1_2, char i_1, char j_1, char k_1>
auto& FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >::operator= ( const Tensor3_Expr< B, U, Dim1_0, Dim1_1, Dim1_2, i_1, j_1, k_1 > &  rhs)

Definition at line 76 of file Tensor3_Expr.hpp.

78  {
79  return equals(rhs);
80  }
auto & equals(const Tensor3_Expr< B, U, Dim1_0, Dim1_1, Dim1_2, i_1, j_1, k_1 > &rhs)

◆ operator=() [2/3]

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int Dim0, int Dim1, int Dim2, char i, char j, char k>
auto& FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >::operator= ( const Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k > &  rhs)

Definition at line 82 of file Tensor3_Expr.hpp.

85  {
86  return equals(rhs);
87  }
auto & equals(const Tensor3_Expr< B, U, Dim1_0, Dim1_1, Dim1_2, i_1, j_1, k_1 > &rhs)

◆ operator=() [3/3]

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int Dim0, int Dim1, int Dim2, char i, char j, char k>
template<class U >
Tensor3_Expr<Tensor3<A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>, T, Dim0, Dim1, Dim2, i, j, k>& FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >::operator= ( const U &  u)

Definition at line 92 of file Tensor3_Expr.hpp.

93  {
94  for(int ii = 0; ii < Dim0; ++ii)
95  for(int jj = 0; jj < Dim1; ++jj)
96  for(int kk = 0; kk < Dim2; ++kk)
97  {
98  iter(ii, jj, kk) = u;
99  }
100  return *this;
101  }

Member Data Documentation

◆ iter

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int Dim0, int Dim1, int Dim2, char i, char j, char k>
Tensor3<A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>& FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >::iter
private

Definition at line 41 of file Tensor3_Expr.hpp.


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