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

#include <src/ftensor/src/FTensor/Tensor2/Tensor2_Expr.hpp>

Collaboration diagram for FTensor::Tensor2_Expr< Tensor2< A, Tensor_Dim0, Tensor_Dim1 >, T, Dim0, Dim1, i, j >:
[legend]

Public Member Functions

 Tensor2_Expr (Tensor2< A, Tensor_Dim0, Tensor_Dim1 > &a)
 
Toperator() (const int N1, const int N2)
 
T operator() (const int N1, const int N2) const
 
Tptr (const int N1, const int N2) const
 
template<class B , class U , int Dim1_0, int Dim1_1, char i_1, char j_1>
auto & equals (const Tensor2_Expr< B, U, Dim1_0, Dim1_1, i_1, j_1 > &rhs)
 
template<class B , class U , int Dim1_0, int Dim1_1, char i_1, char j_1>
auto & operator= (const FTensor::Tensor2_Expr< B, U, Dim1_0, Dim1_1, i_1, j_1 > &rhs)
 
auto & operator= (const Tensor2_Expr< Tensor2< A, Tensor_Dim0, Tensor_Dim1 >, T, Dim0, Dim1, i, j > &rhs)
 
template<class B , class U , int Dim1_0, int Dim1_1, char i_1, char j_1>
auto & operator+= (const Tensor2_Expr< B, U, Dim1_0, Dim1_1, i_1, j_1 > &rhs)
 
template<class B , class U , int Dim1_0, int Dim1_1, char i_1, char j_1>
auto & operator-= (const Tensor2_Expr< B, U, Dim1_0, Dim1_1, i_1, j_1 > &rhs)
 
template<class U >
auto & operator= (const U &u)
 
template<class U >
auto & operator+= (const U &u)
 
template<class U >
auto & operator-= (const U &u)
 
template<class U >
auto & operator*= (const U &u)
 
template<class U >
auto & operator/= (const U &u)
 
template<class B , class U , int Dim1_0, int Dim1_1, char i_1, char j_1>
auto & operator<<= (const Tensor2_Expr< B, U, Dim1_0, Dim1_1, i_1, j_1 > &rhs)
 
template<class B , class U , int Dim1_0, int Dim1_1, char i_1, char j_1>
auto & operator>>= (const Tensor2_Expr< B, U, Dim1_0, Dim1_1, i_1, j_1 > &rhs)
 

Private Attributes

Tensor2< A, Tensor_Dim0, Tensor_Dim1 > & iter
 

Detailed Description

template<class A, class T, int Tensor_Dim0, int Tensor_Dim1, int Dim0, int Dim1, char i, char j>
class FTensor::Tensor2_Expr< Tensor2< A, Tensor_Dim0, Tensor_Dim1 >, T, Dim0, Dim1, i, j >

Definition at line 37 of file Tensor2_Expr.hpp.

Constructor & Destructor Documentation

◆ Tensor2_Expr()

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Dim0, int Dim1, char i, char j>
FTensor::Tensor2_Expr< Tensor2< A, Tensor_Dim0, Tensor_Dim1 >, T, Dim0, Dim1, i, j >::Tensor2_Expr ( Tensor2< A, Tensor_Dim0, Tensor_Dim1 > &  a)

Definition at line 42 of file Tensor2_Expr.hpp.

Member Function Documentation

◆ equals()

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Dim0, int Dim1, char i, char j>
template<class B , class U , int Dim1_0, int Dim1_1, char i_1, char j_1>
auto& FTensor::Tensor2_Expr< Tensor2< A, Tensor_Dim0, Tensor_Dim1 >, T, Dim0, Dim1, i, j >::equals ( const Tensor2_Expr< B, U, Dim1_0, Dim1_1, i_1, j_1 > &  rhs)

Definition at line 52 of file Tensor2_Expr.hpp.

53  {
54  for(int ii = 0; ii < Dim0; ++ii)
55  for(int jj = 0; jj < Dim1; ++jj)
56  {
57  iter(ii, jj) = permute(*this, rhs, ii, jj);
58  }
59  return *this;
60  }
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 Dim0, int Dim1, char i, char j>
T& FTensor::Tensor2_Expr< Tensor2< A, Tensor_Dim0, Tensor_Dim1 >, T, Dim0, Dim1, i, j >::operator() ( const int  N1,
const int  N2 
)

Definition at line 43 of file Tensor2_Expr.hpp.

43 { return iter(N1, N2); }

◆ operator()() [2/2]

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Dim0, int Dim1, char i, char j>
T FTensor::Tensor2_Expr< Tensor2< A, Tensor_Dim0, Tensor_Dim1 >, T, Dim0, Dim1, i, j >::operator() ( const int  N1,
const int  N2 
) const

Definition at line 44 of file Tensor2_Expr.hpp.

44 { return iter(N1, N2); }

◆ operator*=()

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Dim0, int Dim1, char i, char j>
template<class U >
auto& FTensor::Tensor2_Expr< Tensor2< A, Tensor_Dim0, Tensor_Dim1 >, T, Dim0, Dim1, i, j >::operator*= ( const U &  u)

Definition at line 129 of file Tensor2_Expr.hpp.

130  {
131  for(int ii = 0; ii < Dim0; ++ii)
132  for(int jj = 0; jj < Dim1; ++jj)
133  {
134  iter(ii, jj) *= u;
135  }
136  return *this;
137  }

◆ operator+=() [1/2]

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Dim0, int Dim1, char i, char j>
template<class B , class U , int Dim1_0, int Dim1_1, char i_1, char j_1>
auto& FTensor::Tensor2_Expr< Tensor2< A, Tensor_Dim0, Tensor_Dim1 >, T, Dim0, Dim1, i, j >::operator+= ( const Tensor2_Expr< B, U, Dim1_0, Dim1_1, i_1, j_1 > &  rhs)

Definition at line 76 of file Tensor2_Expr.hpp.

77  {
78  for(int ii = 0; ii < Dim0; ++ii)
79  for(int jj = 0; jj < Dim1; ++jj)
80  {
81  iter(ii, jj) += permute(*this, rhs, ii, jj);
82  }
83  return *this;
84  }
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 Dim0, int Dim1, char i, char j>
template<class U >
auto& FTensor::Tensor2_Expr< Tensor2< A, Tensor_Dim0, Tensor_Dim1 >, T, Dim0, Dim1, i, j >::operator+= ( const U &  u)

Definition at line 109 of file Tensor2_Expr.hpp.

110  {
111  for(int ii = 0; ii < Dim0; ++ii)
112  for(int jj = 0; jj < Dim1; ++jj)
113  {
114  iter(ii, jj) += u;
115  }
116  return *this;
117  }

◆ operator-=() [1/2]

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Dim0, int Dim1, char i, char j>
template<class B , class U , int Dim1_0, int Dim1_1, char i_1, char j_1>
auto& FTensor::Tensor2_Expr< Tensor2< A, Tensor_Dim0, Tensor_Dim1 >, T, Dim0, Dim1, i, j >::operator-= ( const Tensor2_Expr< B, U, Dim1_0, Dim1_1, i_1, j_1 > &  rhs)

Definition at line 87 of file Tensor2_Expr.hpp.

88  {
89  for(int ii = 0; ii < Dim0; ++ii)
90  for(int jj = 0; jj < Dim1; ++jj)
91  {
92  iter(ii, jj) -= permute(*this, rhs, ii, jj);
93  }
94  return *this;
95  }
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 Dim0, int Dim1, char i, char j>
template<class U >
auto& FTensor::Tensor2_Expr< Tensor2< A, Tensor_Dim0, Tensor_Dim1 >, T, Dim0, Dim1, i, j >::operator-= ( const U &  u)

Definition at line 119 of file Tensor2_Expr.hpp.

120  {
121  for(int ii = 0; ii < Dim0; ++ii)
122  for(int jj = 0; jj < Dim1; ++jj)
123  {
124  iter(ii, jj) -= u;
125  }
126  return *this;
127  }

◆ operator/=()

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Dim0, int Dim1, char i, char j>
template<class U >
auto& FTensor::Tensor2_Expr< Tensor2< A, Tensor_Dim0, Tensor_Dim1 >, T, Dim0, Dim1, i, j >::operator/= ( const U &  u)

Definition at line 139 of file Tensor2_Expr.hpp.

140  {
141  for(int ii = 0; ii < Dim0; ++ii)
142  for(int jj = 0; jj < Dim1; ++jj)
143  {
144  iter(ii, jj) /= u;
145  }
146  return *this;
147  }

◆ operator<<=()

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Dim0, int Dim1, char i, char j>
template<class B , class U , int Dim1_0, int Dim1_1, char i_1, char j_1>
auto& FTensor::Tensor2_Expr< Tensor2< A, Tensor_Dim0, Tensor_Dim1 >, T, Dim0, Dim1, i, j >::operator<<= ( const Tensor2_Expr< B, U, Dim1_0, Dim1_1, i_1, j_1 > &  rhs)

Definition at line 152 of file Tensor2_Expr.hpp.

153  {
154  for(int ii = 0; ii < Dim0; ++ii)
155  for(int jj = 0; jj < Dim1; ++jj)
156  {
157  iter(ii, jj) <<= permute(*this, rhs, ii, jj);
158  }
159  return *this;
160  }
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 Dim0, int Dim1, char i, char j>
template<class B , class U , int Dim1_0, int Dim1_1, char i_1, char j_1>
auto& FTensor::Tensor2_Expr< Tensor2< A, Tensor_Dim0, Tensor_Dim1 >, T, Dim0, Dim1, i, j >::operator= ( const FTensor::Tensor2_Expr< B, U, Dim1_0, Dim1_1, i_1, j_1 > &  rhs)

Definition at line 64 of file Tensor2_Expr.hpp.

65  {
66  return equals(rhs);
67  }
auto & equals(const Tensor2_Expr< B, U, Dim1_0, Dim1_1, i_1, j_1 > &rhs)

◆ operator=() [2/3]

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Dim0, int Dim1, char i, char j>
auto& FTensor::Tensor2_Expr< Tensor2< A, Tensor_Dim0, Tensor_Dim1 >, T, Dim0, Dim1, i, j >::operator= ( const Tensor2_Expr< Tensor2< A, Tensor_Dim0, Tensor_Dim1 >, T, Dim0, Dim1, i, j > &  rhs)

Definition at line 69 of file Tensor2_Expr.hpp.

71  {
72  return equals(rhs);
73  }
auto & equals(const Tensor2_Expr< B, U, Dim1_0, Dim1_1, i_1, j_1 > &rhs)

◆ operator=() [3/3]

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Dim0, int Dim1, char i, char j>
template<class U >
auto& FTensor::Tensor2_Expr< Tensor2< A, Tensor_Dim0, Tensor_Dim1 >, T, Dim0, Dim1, i, j >::operator= ( const U &  u)

Definition at line 99 of file Tensor2_Expr.hpp.

100  {
101  for(int ii = 0; ii < Dim0; ++ii)
102  for(int jj = 0; jj < Dim1; ++jj)
103  {
104  iter(ii, jj) = u;
105  }
106  return *this;
107  }

◆ operator>>=()

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Dim0, int Dim1, char i, char j>
template<class B , class U , int Dim1_0, int Dim1_1, char i_1, char j_1>
auto& FTensor::Tensor2_Expr< Tensor2< A, Tensor_Dim0, Tensor_Dim1 >, T, Dim0, Dim1, i, j >::operator>>= ( const Tensor2_Expr< B, U, Dim1_0, Dim1_1, i_1, j_1 > &  rhs)

Definition at line 163 of file Tensor2_Expr.hpp.

164  {
165  for(int ii = 0; ii < Dim0; ++ii)
166  for(int jj = 0; jj < Dim1; ++jj)
167  {
168  iter(ii, jj) >>= permute_ref(*this, rhs, ii, jj);
169  }
170  return *this;
171  }
U & permute_ref(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:45

◆ ptr()

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Dim0, int Dim1, char i, char j>
T* FTensor::Tensor2_Expr< Tensor2< A, Tensor_Dim0, Tensor_Dim1 >, T, Dim0, Dim1, i, j >::ptr ( const int  N1,
const int  N2 
) const

Definition at line 45 of file Tensor2_Expr.hpp.

45 { return iter.ptr(N1, N2); }
T * ptr(const int N1, const int N2) const

Member Data Documentation

◆ iter

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Dim0, int Dim1, char i, char j>
Tensor2<A, Tensor_Dim0, Tensor_Dim1>& FTensor::Tensor2_Expr< Tensor2< A, Tensor_Dim0, Tensor_Dim1 >, T, Dim0, Dim1, i, j >::iter
private

Definition at line 39 of file Tensor2_Expr.hpp.


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