v0.14.0
Loading...
Searching...
No Matches
Tensor3_number.hpp
Go to the documentation of this file.
1/* This is for expressions where a number is used for one or two
2 slots, and an index for the others, yielding a Tensor1_Expr or
3 Tensor2_Expr. */
4
5#pragma once
6
7namespace FTensor
8{
9 /* First slot. */
10
11 template <class A, class T, int N> class Tensor3_number_0
12 {
14
15 public:
16 T operator()(const int N1, const int N2) const { return iterA(N, N1, N2); }
17 Tensor3_number_0(const A &a) : iterA(a) {}
18 };
19
20 template <class A, class T, int N> class Tensor3_number_rhs_0
21 {};
22
23 /* Second slot. */
24
25 template <class A, class T, int N> class Tensor3_number_1
26 {
28
29 public:
30 T operator()(const int N1, const int N2) const { return iterA(N1, N, N2); }
31 Tensor3_number_1(const A &a) : iterA(a) {}
32 };
33
34 template <class A, class T, int N> class Tensor3_number_rhs_1
35 {};
36
37 /* Third slot. */
38
39 template <class A, class T, int N> class Tensor3_number_2
40 {
42
43 public:
44 T operator()(const int N1, const int N2) const { return iterA(N1, N2, N); }
45 Tensor3_number_2(const A &a) : iterA(a) {}
46 };
47
48 template <class A, class T, int N> class Tensor3_number_rhs_2
49 {};
50
51 /* First and second slot. */
52
53 template <class A, class T, int N1, int N2> class Tensor3_number_01
54 {
56
57 public:
58 T operator()(const int N) const { return iterA(N1, N2, N); }
59 Tensor3_number_01(const A &a) : iterA(a) {}
60 };
61
62 template <class A, class T, int N1, int N2> class Tensor3_number_rhs_01
63 {};
64
65 /* First and third slot. */
66
67 template <class A, class T, int N1, int N2> class Tensor3_number_02
68 {
70
71 public:
72 T operator()(const int N) const { return iterA(N1, N, N2); }
73 Tensor3_number_02(const A &a) : iterA(a) {}
74 };
75
76 template <class A, class T, int N1, int N2> class Tensor3_number_rhs_02
77 {};
78
79 /* Second and third slot. */
80
81 template <class A, class T, int N1, int N2> class Tensor3_number_12
82 {
84
85 public:
86 T operator()(const int N) const { return iterA(N, N1, N2); }
87 Tensor3_number_12(const A &a) : iterA(a) {}
88 };
89
90 template <class A, class T, int N1, int N2> class Tensor3_number_rhs_12
91 {};
92}
static Number< 2 > N2
static Number< 1 > N1
constexpr double a
T operator()(const int N) const
T operator()(const int N) const
T operator()(const int N1, const int N2) const
T operator()(const int N) const
T operator()(const int N1, const int N2) const
T operator()(const int N1, const int N2) const
const double T
Tensors class implemented by Walter Landry.
Definition: FTensor.hpp:51
constexpr AssemblyType A
const int N
Definition: speed_test.cpp:3