v0.14.0
permute.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Permutation2.hpp"
4 #include "Permutation3.hpp"
5 #include "Permutation4.hpp"
6 
7 namespace FTensor
8 {
9  template <class A, class T, class B, class U, int Dim0_0, int Dim0_1,
10  int Dim1_0, int Dim1_1, char i0, char j0, char i1, char j1>
13  const int N0, const int N1)
14  {
15  return Permutation2<Dim0_0, Dim0_1, i0, j0>().eval(rhs, N0, N1);
16  }
17 
18  template <class A, class T, class B, class U, int Dim0_0, int Dim0_1,
19  int Dim0_2, int Dim1_0, int Dim1_1, int Dim1_2, char i0, char j0,
20  char k0, char i1, char j1, char k1>
23  const int N0, const int N1, const int N2)
24  {
26  N2);
27  }
28 
29  template <class A, class T, class B, class U, int Dim0_0, int Dim0_1,
30  int Dim0_2, int Dim1_01, int Dim1_2, char i0, char j0, char k0,
31  char i1, char j1, char k1>
33  const Dg_Expr<B, U, Dim1_01, Dim1_2, i1, j1, k1> &rhs, const int N0,
34  const int N1, const int N2) {
36  N2);
37  }
38 
39  template <class A, class T, class B, class U, int Dim0_0, int Dim0_1,
40  int Dim0_2, int Dim0_3, int Dim1_0, int Dim1_1, int Dim1_2,
41  int Dim1_3, char i0, char j0, char k0, char l0, char i1, char j1,
42  char k1, char l1>
46  &rhs,
47  const int N0, const int N1, const int N2, const int N3)
48  {
50  rhs, N0, N1, N2, N3);
51  }
52 
53  template <class A, class T, class B, class U, int Dim0_0, int Dim0_1,
54  int Dim0_2, int Dim0_3, int Dim1_01, int Dim1_23, char i0, char j0,
55  char k0, char l0, char i1, char j1, char k1, char l1>
56  U permute(const Tensor4_Expr<A, T, Dim0_0, Dim0_1, Dim0_2, Dim0_3, i0, j0, k0,
57  l0> &,
59  const int N0, const int N1, const int N2, const int N3) {
61  rhs, N0, N1, N2, N3);
62  }
63 
64  template <class A, class T, class B, class U, int Dim0_0, int Dim0_1,
65  int Dim1_0, int Dim1_1, char i0, char j0, char i1, char j1>
68  const int N0, const int N1) {
69  return Permutation2<Dim0_0, Dim0_1, i0, j0>().eval_ref(rhs, N0, N1);
70  }
71 }
FTensor::Permutation2::eval
U eval(const Tensor2_Expr< B, U, Dim0, Dim1, i, j > &rhs, const int N0, const int N1)
Definition: Permutation2.hpp:12
FTensor
JSON compatible output.
Definition: Christof_constructor.hpp:6
FTensor::permute_ref
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:66
FTensor::Permutation3
Definition: Permutation3.hpp:8
FTensor::Tensor2_Expr
Definition: Tensor2_Expr.hpp:26
A
constexpr AssemblyType A
Definition: operators_tests.cpp:30
FTensor::Permutation4::eval
U eval(const Tensor4_Expr< B, U, Dim0, Dim1, Dim2, Dim3, i, j, k, l > &rhs, const int N0, const int N1, const int N2, const int N3)
Definition: Permutation4.hpp:15
FTensor::Permutation3::eval
U eval(const Tensor3_Expr< B, U, Dim0, Dim1, Dim2, i, j, k > &rhs, const int N0, const int N1, const int N2)
Definition: Permutation3.hpp:13
FTensor::permute
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
FTensor::Permutation2::eval_ref
U & eval_ref(const Tensor2_Expr< B, U, Dim0, Dim1, i, j > &rhs, const int N0, const int N1)
Definition: Permutation2.hpp:34
FTensor::Ddg_Expr
Definition: Ddg_Expr.hpp:28
FTensor::Tensor4_Expr
Definition: Tensor4_Expr.hpp:25
Permutation4.hpp
FTensor::Tensor3_Expr
Definition: Tensor3_Expr.hpp:24
FTensor::Dg_Expr
Definition: Dg_Expr.hpp:25
Permutation2.hpp
FTensor::Permutation2
Definition: Permutation2.hpp:7
Permutation3.hpp
FTensor::Permutation4
Definition: Permutation4.hpp:9
EshelbianPlasticity::U
@ U
Definition: EshelbianContact.cpp:197