v0.13.2
Loading...
Searching...
No Matches
Tensor3_numeral.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 or second slot. */
10
11 template <class A, class T> class Tensor3_numeral_0
12 {
14 int N;
15
16 public:
17 T operator()(const int N1, const int N2) const { return iterA(N, N1, N2); }
18 Tensor3_numeral_0(const A &a, const int NN) : iterA(a), N(NN) {}
19 };
20
21 /* Third slot. */
22
23 template <class A, class T> class Tensor3_numeral_2
24 {
26 int N;
27
28 public:
29 T operator()(const int N1, const int N2) const { return iterA(N1, N2, N); }
30 Tensor3_numeral_2(const A &a, const int NN) : iterA(a), N(NN) {}
31 };
32
33 /* Second and third slot (or first and third slot). */
34
35 template <class A, class T> class Tensor3_numeral_12
36 {
38 int N1, N2;
39
40 public:
41 T operator()(const int N) const { return iterA(N, N1, N2); }
42 Tensor3_numeral_12(const A &a, const int NN1, const int NN2)
43 : iterA(a), N1(NN1), N2(NN2)
44 {}
45 };
46
47 /* First and second slot. */
48
49 template <class A, class T> class Tensor3_numeral_01
50 {
52 int N1, N2;
53
54 public:
55 T operator()(const int N) const { return iterA(N1, N2, N); }
56 Tensor3_numeral_01(const A &a, const int NN1, const int NN2)
57 : iterA(a), N1(NN1), N2(NN2)
58 {}
59 };
60}
static Number< 2 > N2
static Number< 1 > N1
constexpr double a
T operator()(const int N) const
Tensor3_numeral_01(const A &a, const int NN1, const int NN2)
Tensor3_numeral_0(const A &a, const int NN)
T operator()(const int N1, const int N2) const
T operator()(const int N) const
Tensor3_numeral_12(const A &a, const int NN1, const int NN2)
Tensor3_numeral_2(const A &a, const int NN)
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