v0.5.86
Tensor1_constructor.hpp
Go to the documentation of this file.
1 /* A helper class that allows simple initialization of the Tensor1,
2  but only if it has the correct number of elements. */
3 
4 template<class T, int Tensor_Dim>
6 
7 template<class T>
9 {
10 public:
11  Tensor1_constructor(T data[], T d0, T d1)
12  {
13  data[0]=d0;
14  data[1]=d1;
15  }
16 };
17 
18 template<class T>
20 {
21 public:
22  Tensor1_constructor(T data[], T d0, T d1, T d2)
23  {
24  data[0]=d0;
25  data[1]=d1;
26  data[2]=d2;
27  }
28 };
29 
30 template<class T>
32 {
33 public:
34  Tensor1_constructor(T data[], T d0, T d1, T d2, T d3)
35  {
36  data[0]=d0;
37  data[1]=d1;
38  data[2]=d2;
39  data[3]=d3;
40  }
41 };
Tensor1_constructor(T data[], T d0, T d1, T d2, T d3)
Tensor1_constructor(T data[], T d0, T d1)
Tensor1_constructor(T data[], T d0, T d1, T d2)