v0.14.0
Loading...
Searching...
No Matches
Tensor4_number.hpp
Go to the documentation of this file.
1/* This is for expressions where a number is used for one, two or three
2 slots, and an index for the others, yielding a Tensor1_Expr, Tenors2_Expr or
3 Tensor3_Expr. */
4
5#pragma once
6
7namespace FTensor
8{
9
10 /* Third slot. */
11
12 template <class A, class T, int N> class Tensor4_number_2
13 {
15
16 public:
17 T operator()(const int N0, const int N1, const int N3) const {
18 return iterA(N0, N1, N, N3);
19 }
20 Tensor4_number_2(const A &a) : iterA(a) {}
21 };
22
23 template <class A, class T, int N> class Tensor4_number_rhs_2
24 {};
25
26 /* Forth slot. */
27
28 template <class A, class T, int N> class Tensor4_number_3
29 {
31
32 public:
33 T operator()(const int N0, const int N1, const int N2) const {
34 return iterA(N0, N1, N2, N);
35 }
36 Tensor4_number_3(const A &a) : iterA(a) {}
37 };
38
39 template <class A, class T, int N> class Tensor4_number_rhs_3
40 {};
41
42}
static Number< 2 > N2
static Number< 1 > N1
static Number< 0 > N0
constexpr double a
T operator()(const int N0, const int N1, const int N3) const
T operator()(const int N0, const int N1, const int N2) const
Tensors class implemented by Walter Landry.
Definition FTensor.hpp:51
const int N
Definition speed_test.cpp:3