v0.8.7
Public Member Functions | Private Attributes | List of all members
FTensor::Ddg< T *, Tensor_Dim01, Tensor_Dim23 > Class Template Reference

#include <src/ftensor/src/FTensor/Ddg/Ddg_pointer.hpp>

Collaboration diagram for FTensor::Ddg< T *, Tensor_Dim01, Tensor_Dim23 >:
[legend]

Public Member Functions

 Ddg (T *d0000, T *d0010, T *d0011, T *d1000, T *d1010, T *d1011, T *d1100, T *d1110, T *d1111, const int i=1)
 
 Ddg (T *d0000, T *d0001, T *d0002, T *d0011, T *d0012, T *d0022, T *d0100, T *d0101, T *d0102, T *d0111, T *d0112, T *d0122, T *d0200, T *d0201, T *d0202, T *d0211, T *d0212, T *d0222, T *d1100, T *d1101, T *d1102, T *d1111, T *d1112, T *d1122, T *d1200, T *d1201, T *d1202, T *d1211, T *d1212, T *d1222, T *d2200, T *d2201, T *d2202, T *d2211, T *d2212, T *d2222, const int i=1)
 
T & operator() (const int N1, const int N2, const int N3, const int N4)
 
operator() (const int N1, const int N2, const int N3, const int N4) const
 
T *restrict & ptr (const int N1, const int N2, const int N3, const int N4) const
 
template<char i, char j, char k, char l, int Dim01, int Dim23>
Ddg_Expr< Ddg< T *, Tensor_Dim01, Tensor_Dim23 >, T, Dim01, Dim23, i, j, k, l > operator() (const Index< i, Dim01 > index1, const Index< j, Dim01 > index2, const Index< k, Dim23 > index3, const Index< l, Dim23 > index4)
 
template<char i, char j, char k, char l, int Dim01, int Dim23>
Ddg_Expr< const Ddg< T *, Tensor_Dim01, Tensor_Dim23 >, T, Dim01, Dim23, i, j, k, l > operator() (const Index< i, Dim01 > index1, const Index< j, Dim01 > index2, const Index< k, Dim23 > index3, const Index< l, Dim23 > index4) const
 
template<char i, char j, int N0, int N1, int Dim>
Tensor2_symmetric_Expr< Ddg_number_01< const Ddg< T *, Tensor_Dim01, Tensor_Dim23 >, T, N0, N1 >, T, Dim, i, j > operator() (const Number< N0 > n1, const Number< N1 > n2, const Index< i, Dim > index1, const Index< j, Dim > index2) const
 
template<char i, char j, int N0, int N1, int Dim>
Tensor2_symmetric_Expr< Ddg_number_rhs_01< Ddg< T *, Tensor_Dim01, Tensor_Dim23 >, T, N0, N1 >, T, Dim, i, j > operator() (const Number< N0 > n1, const Number< N1 > n2, const Index< i, Dim > index1, const Index< j, Dim > index2)
 
template<char i, char j, char k, int N0, int Dim1, int Dim23>
Dg_Expr< Ddg_number_0< const Ddg< T *, Tensor_Dim01, Tensor_Dim23 >, T, N0 >, T, Dim23, Dim1, i, j, k > operator() (const Number< N0 > n1, const Index< k, Dim1 > index3, const Index< i, Dim23 > index1, const Index< j, Dim23 > index2) const
 
template<char i, char j, char k, int N0, int Dim1, int Dim23>
Dg_Expr< Ddg_number_rhs_0< Ddg< T *, Tensor_Dim01, Tensor_Dim23 >, T, N0 >, T, Dim23, Dim1, i, j, k > operator() (const Number< N0 > n1, const Index< k, Dim1 > index3, const Index< i, Dim23 > index1, const Index< j, Dim23 > index2)
 
template<char i, char j, int Dim>
Tensor2_symmetric_Expr< Ddg_numeral_01< const Ddg< T *, Tensor_Dim01, Tensor_Dim23 >, T >, T, Dim, i, j > operator() (const int N0, const int N1, const Index< i, Dim > index1, const Index< j, Dim > index2) const
 
template<char i, char j, int Dim>
Tensor2_symmetric_Expr< Ddg_numeral_23< Ddg< T *, Tensor_Dim01, Tensor_Dim23 >, T >, T, Dim, i, j > operator() (const Index< i, Dim > index1, const Index< j, Dim > index2, const int N2, const int N3) const
 
template<char i, int Dim>
Tensor1_Expr< Ddg_numeral_123< Ddg< T *, Tensor_Dim01, Tensor_Dim23 >, T >, T, Dim, i > operator() (const Index< i, Dim > index1, const int N1, const int N2, const int N3)
 
template<char i, int Dim>
Tensor1_Expr< Ddg_numeral_123< Ddg< T *, Tensor_Dim01, Tensor_Dim23 >, T >, T, Dim, i > operator() (const int N1, const Index< i, Dim > index1, const int N2, const int N3)
 
template<char i, char j, char k, int Dim1, int Dim23>
Dg_Expr< Ddg_numeral_0< const Ddg< T *, Tensor_Dim01, Tensor_Dim23 >, T >, T, Dim23, Dim1, i, j, k > operator() (const int N0, const Index< k, Dim1 > index3, const Index< i, Dim23 > index1, const Index< j, Dim23 > index2) const
 
const Ddg< T *, Tensor_Dim01, Tensor_Dim23 > & operator++ () const
 

Private Attributes

const int inc
 
T *restrict data [(Tensor_Dim01 *(Tensor_Dim01+1))/2][(Tensor_Dim23 *(Tensor_Dim23+1))/2]
 

Detailed Description

template<class T, int Tensor_Dim01, int Tensor_Dim23>
class FTensor::Ddg< T *, Tensor_Dim01, Tensor_Dim23 >

Definition at line 8 of file Ddg_pointer.hpp.

Constructor & Destructor Documentation

◆ Ddg() [1/2]

template<class T , int Tensor_Dim01, int Tensor_Dim23>
FTensor::Ddg< T *, Tensor_Dim01, Tensor_Dim23 >::Ddg ( T *  d0000,
T *  d0010,
T *  d0011,
T *  d1000,
T *  d1010,
T *  d1011,
T *  d1100,
T *  d1110,
T *  d1111,
const int  i = 1 
)

Definition at line 15 of file Ddg_pointer.hpp.

17  : inc(i)
18  {
19  ptr(0, 0, 0, 0) = d0000;
20  ptr(0, 0, 1, 0) = d0010;
21  ptr(0, 0, 1, 1) = d0011;
22  ptr(1, 0, 0, 0) = d1000;
23  ptr(1, 0, 1, 0) = d1010;
24  ptr(1, 0, 1, 1) = d1011;
25  ptr(1, 1, 0, 0) = d1100;
26  ptr(1, 1, 1, 0) = d1110;
27  ptr(1, 1, 1, 1) = d1111;
28  }
T *restrict & ptr(const int N1, const int N2, const int N3, const int N4) const

◆ Ddg() [2/2]

template<class T , int Tensor_Dim01, int Tensor_Dim23>
FTensor::Ddg< T *, Tensor_Dim01, Tensor_Dim23 >::Ddg ( T *  d0000,
T *  d0001,
T *  d0002,
T *  d0011,
T *  d0012,
T *  d0022,
T *  d0100,
T *  d0101,
T *  d0102,
T *  d0111,
T *  d0112,
T *  d0122,
T *  d0200,
T *  d0201,
T *  d0202,
T *  d0211,
T *  d0212,
T *  d0222,
T *  d1100,
T *  d1101,
T *  d1102,
T *  d1111,
T *  d1112,
T *  d1122,
T *  d1200,
T *  d1201,
T *  d1202,
T *  d1211,
T *  d1212,
T *  d1222,
T *  d2200,
T *  d2201,
T *  d2202,
T *  d2211,
T *  d2212,
T *  d2222,
const int  i = 1 
)

Definition at line 30 of file Ddg_pointer.hpp.

36  : inc(i)
37  {
38  ptr(0, 0, 0, 0) = d0000;
39  ptr(0, 0, 0, 1) = d0001;
40  ptr(0, 0, 0, 2) = d0002;
41  ptr(0, 0, 1, 1) = d0011;
42  ptr(0, 0, 1, 2) = d0012;
43  ptr(0, 0, 2, 2) = d0022;
44  ptr(0, 1, 0, 0) = d0100;
45  ptr(0, 1, 0, 1) = d0101;
46  ptr(0, 1, 0, 2) = d0102;
47  ptr(0, 1, 1, 1) = d0111;
48  ptr(0, 1, 1, 2) = d0112;
49  ptr(0, 1, 2, 2) = d0122;
50  ptr(0, 2, 0, 0) = d0200;
51  ptr(0, 2, 0, 1) = d0201;
52  ptr(0, 2, 0, 2) = d0202;
53  ptr(0, 2, 1, 1) = d0211;
54  ptr(0, 2, 1, 2) = d0212;
55  ptr(0, 2, 2, 2) = d0222;
56  ptr(1, 1, 0, 0) = d1100;
57  ptr(1, 1, 0, 1) = d1101;
58  ptr(1, 1, 0, 2) = d1102;
59  ptr(1, 1, 1, 1) = d1111;
60  ptr(1, 1, 1, 2) = d1112;
61  ptr(1, 1, 2, 2) = d1122;
62  ptr(1, 2, 0, 0) = d1200;
63  ptr(1, 2, 0, 1) = d1201;
64  ptr(1, 2, 0, 2) = d1202;
65  ptr(1, 2, 1, 1) = d1211;
66  ptr(1, 2, 1, 2) = d1212;
67  ptr(1, 2, 2, 2) = d1222;
68  ptr(2, 2, 0, 0) = d2200;
69  ptr(2, 2, 0, 1) = d2201;
70  ptr(2, 2, 0, 2) = d2202;
71  ptr(2, 2, 1, 1) = d2211;
72  ptr(2, 2, 1, 2) = d2212;
73  ptr(2, 2, 2, 2) = d2222;
74  }
T *restrict & ptr(const int N1, const int N2, const int N3, const int N4) const

Member Function Documentation

◆ operator()() [1/13]

template<class T , int Tensor_Dim01, int Tensor_Dim23>
T& FTensor::Ddg< T *, Tensor_Dim01, Tensor_Dim23 >::operator() ( const int  N1,
const int  N2,
const int  N3,
const int  N4 
)

Definition at line 80 of file Ddg_pointer.hpp.

81  {
82 #ifdef FTENSOR_DEBUG
83  if(N1 >= Tensor_Dim01 || N1 < 0 || N2 >= Tensor_Dim01 || N2 < 0
84  || N3 >= Tensor_Dim23 || N3 < 0 || N4 >= Tensor_Dim23 || N4 < 0)
85  {
86  std::stringstream s;
87  s << "Bad index in Dg<T*," << Tensor_Dim01 << "," << Tensor_Dim23
88  << ">.operator(" << N1 << "," << N2 << "," << N3 << "," << N4
89  << ")" << std::endl;
90  throw std::out_of_range(s.str());
91  }
92 #endif
93  return N1 > N2
94  ? (N3 > N4 ? *data[N1 + (N2 * (2 * Tensor_Dim01 - N2 - 1)) / 2]
95  [N3 + (N4 * (2 * Tensor_Dim23 - N4 - 1)) / 2]
96  : *data[N1 + (N2 * (2 * Tensor_Dim01 - N2 - 1)) / 2]
97  [N4 + (N3 * (2 * Tensor_Dim23 - N3 - 1)) / 2])
98  : (N3 > N4
99  ? *data[N2 + (N1 * (2 * Tensor_Dim01 - N1 - 1)) / 2]
100  [N3 + (N4 * (2 * Tensor_Dim23 - N4 - 1)) / 2]
101  : *data[N2 + (N1 * (2 * Tensor_Dim01 - N1 - 1)) / 2]
102  [N4 + (N3 * (2 * Tensor_Dim23 - N3 - 1)) / 2]);
103  }
T *restrict data[(Tensor_Dim01 *(Tensor_Dim01+1))/2][(Tensor_Dim23 *(Tensor_Dim23+1))/2]
Definition: Ddg_pointer.hpp:12

◆ operator()() [2/13]

template<class T , int Tensor_Dim01, int Tensor_Dim23>
T FTensor::Ddg< T *, Tensor_Dim01, Tensor_Dim23 >::operator() ( const int  N1,
const int  N2,
const int  N3,
const int  N4 
) const

Definition at line 105 of file Ddg_pointer.hpp.

106  {
107 #ifdef FTENSOR_DEBUG
108  if(N1 >= Tensor_Dim01 || N1 < 0 || N2 >= Tensor_Dim01 || N2 < 0
109  || N3 >= Tensor_Dim23 || N3 < 0 || N4 >= Tensor_Dim23 || N4 < 0)
110  {
111  std::stringstream s;
112  s << "Bad index in Dg<T*," << Tensor_Dim01 << "," << Tensor_Dim23
113  << ">.operator(" << N1 << "," << N2 << "," << N3 << "," << N4
114  << ") const" << std::endl;
115  throw std::out_of_range(s.str());
116  }
117 #endif
118  return N1 > N2
119  ? (N3 > N4 ? *data[N1 + (N2 * (2 * Tensor_Dim01 - N2 - 1)) / 2]
120  [N3 + (N4 * (2 * Tensor_Dim23 - N4 - 1)) / 2]
121  : *data[N1 + (N2 * (2 * Tensor_Dim01 - N2 - 1)) / 2]
122  [N4 + (N3 * (2 * Tensor_Dim23 - N3 - 1)) / 2])
123  : (N3 > N4
124  ? *data[N2 + (N1 * (2 * Tensor_Dim01 - N1 - 1)) / 2]
125  [N3 + (N4 * (2 * Tensor_Dim23 - N4 - 1)) / 2]
126  : *data[N2 + (N1 * (2 * Tensor_Dim01 - N1 - 1)) / 2]
127  [N4 + (N3 * (2 * Tensor_Dim23 - N3 - 1)) / 2]);
128  }
T *restrict data[(Tensor_Dim01 *(Tensor_Dim01+1))/2][(Tensor_Dim23 *(Tensor_Dim23+1))/2]
Definition: Ddg_pointer.hpp:12

◆ operator()() [3/13]

template<class T , int Tensor_Dim01, int Tensor_Dim23>
template<char i, char j, char k, char l, int Dim01, int Dim23>
Ddg_Expr<Ddg<T *, Tensor_Dim01, Tensor_Dim23>, T, Dim01, Dim23, i, j, k, l> FTensor::Ddg< T *, Tensor_Dim01, Tensor_Dim23 >::operator() ( const Index< i, Dim01 >  index1,
const Index< j, Dim01 >  index2,
const Index< k, Dim23 >  index3,
const Index< l, Dim23 >  index4 
)

Definition at line 161 of file Ddg_pointer.hpp.

163  {
164  return Ddg_Expr<Ddg<T *, Tensor_Dim01, Tensor_Dim23>, T, Dim01, Dim23, i,
165  j, k, l>(*this);
166  }

◆ operator()() [4/13]

template<class T , int Tensor_Dim01, int Tensor_Dim23>
template<char i, char j, char k, char l, int Dim01, int Dim23>
Ddg_Expr<const Ddg<T *, Tensor_Dim01, Tensor_Dim23>, T, Dim01, Dim23, i, j, k, l> FTensor::Ddg< T *, Tensor_Dim01, Tensor_Dim23 >::operator() ( const Index< i, Dim01 >  index1,
const Index< j, Dim01 >  index2,
const Index< k, Dim23 >  index3,
const Index< l, Dim23 >  index4 
) const

Definition at line 171 of file Ddg_pointer.hpp.

174  {
175  return Ddg_Expr<const Ddg<T *, Tensor_Dim01, Tensor_Dim23>, T, Dim01,
176  Dim23, i, j, k, l>(*this);
177  }

◆ operator()() [5/13]

template<class T , int Tensor_Dim01, int Tensor_Dim23>
template<char i, char j, int N0, int N1, int Dim>
Tensor2_symmetric_Expr< Ddg_number_01<const Ddg<T *, Tensor_Dim01, Tensor_Dim23>, T, N0, N1>, T, Dim, i, j> FTensor::Ddg< T *, Tensor_Dim01, Tensor_Dim23 >::operator() ( const Number< N0 >  n1,
const Number< N1 >  n2,
const Index< i, Dim >  index1,
const Index< j, Dim >  index2 
) const

Definition at line 186 of file Ddg_pointer.hpp.

188  {
189  using TensorExpr
190  = Ddg_number_01<const Ddg<T *, Tensor_Dim01, Tensor_Dim23>, T, N0, N1>;
191  return Tensor2_symmetric_Expr<TensorExpr, T, Dim, i, j>(
192  TensorExpr(*this));
193  }

◆ operator()() [6/13]

template<class T , int Tensor_Dim01, int Tensor_Dim23>
template<char i, char j, int N0, int N1, int Dim>
Tensor2_symmetric_Expr< Ddg_number_rhs_01<Ddg<T *, Tensor_Dim01, Tensor_Dim23>, T, N0, N1>, T, Dim, i, j> FTensor::Ddg< T *, Tensor_Dim01, Tensor_Dim23 >::operator() ( const Number< N0 >  n1,
const Number< N1 >  n2,
const Index< i, Dim >  index1,
const Index< j, Dim >  index2 
)

Definition at line 199 of file Ddg_pointer.hpp.

201  {
202  using TensorExpr
203  = Ddg_number_rhs_01<Ddg<T *, Tensor_Dim01, Tensor_Dim23>, T, N0, N1>;
204  return Tensor2_symmetric_Expr<TensorExpr, T, Dim, i, j>(*this);
205  }

◆ operator()() [7/13]

template<class T , int Tensor_Dim01, int Tensor_Dim23>
template<char i, char j, char k, int N0, int Dim1, int Dim23>
Dg_Expr<Ddg_number_0<const Ddg<T *, Tensor_Dim01, Tensor_Dim23>, T, N0>, T, Dim23, Dim1, i, j, k> FTensor::Ddg< T *, Tensor_Dim01, Tensor_Dim23 >::operator() ( const Number< N0 >  n1,
const Index< k, Dim1 >  index3,
const Index< i, Dim23 >  index1,
const Index< j, Dim23 >  index2 
) const

Definition at line 213 of file Ddg_pointer.hpp.

216  {
217  using TensorExpr
218  = Ddg_number_0<const Ddg<T *, Tensor_Dim01, Tensor_Dim23>, T, N0>;
219  return Dg_Expr<TensorExpr, T, Dim23, Dim1, i, j, k>(TensorExpr(*this));
220  }

◆ operator()() [8/13]

template<class T , int Tensor_Dim01, int Tensor_Dim23>
template<char i, char j, char k, int N0, int Dim1, int Dim23>
Dg_Expr<Ddg_number_rhs_0<Ddg<T *, Tensor_Dim01, Tensor_Dim23>, T, N0>, T, Dim23, Dim1, i, j, k> FTensor::Ddg< T *, Tensor_Dim01, Tensor_Dim23 >::operator() ( const Number< N0 >  n1,
const Index< k, Dim1 >  index3,
const Index< i, Dim23 >  index1,
const Index< j, Dim23 >  index2 
)

Definition at line 225 of file Ddg_pointer.hpp.

227  {
228  using TensorExpr
229  = Ddg_number_rhs_0<Ddg<T *, Tensor_Dim01, Tensor_Dim23>, T, N0>;
230  return Dg_Expr<TensorExpr, T, Dim23, Dim1, i, j, k>(*this);
231  }

◆ operator()() [9/13]

template<class T , int Tensor_Dim01, int Tensor_Dim23>
template<char i, char j, int Dim>
Tensor2_symmetric_Expr< Ddg_numeral_01<const Ddg<T *, Tensor_Dim01, Tensor_Dim23>, T>, T, Dim, i, j> FTensor::Ddg< T *, Tensor_Dim01, Tensor_Dim23 >::operator() ( const int  N0,
const int  N1,
const Index< i, Dim >  index1,
const Index< j, Dim >  index2 
) const

Definition at line 241 of file Ddg_pointer.hpp.

243  {
244  using TensorExpr
245  = Ddg_numeral_01<const Ddg<T *, Tensor_Dim01, Tensor_Dim23>, T>;
246  return Tensor2_symmetric_Expr<TensorExpr, T, Dim, i, j>(
247  TensorExpr(*this, N0, N1));
248  }

◆ operator()() [10/13]

template<class T , int Tensor_Dim01, int Tensor_Dim23>
template<char i, char j, int Dim>
Tensor2_symmetric_Expr< Ddg_numeral_23<Ddg<T *, Tensor_Dim01, Tensor_Dim23>, T>, T, Dim, i, j> FTensor::Ddg< T *, Tensor_Dim01, Tensor_Dim23 >::operator() ( const Index< i, Dim >  index1,
const Index< j, Dim >  index2,
const int  N2,
const int  N3 
) const

Definition at line 253 of file Ddg_pointer.hpp.

255  {
256  using TensorExpr
257  = Ddg_numeral_23<Ddg<T *, Tensor_Dim01, Tensor_Dim23>, T>;
258  return Tensor2_symmetric_Expr<TensorExpr, T, Dim, i, j>(
259  TensorExpr(*this, N2, N3));
260  }

◆ operator()() [11/13]

template<class T , int Tensor_Dim01, int Tensor_Dim23>
template<char i, int Dim>
Tensor1_Expr<Ddg_numeral_123<Ddg<T *, Tensor_Dim01, Tensor_Dim23>, T>, T, Dim, i> FTensor::Ddg< T *, Tensor_Dim01, Tensor_Dim23 >::operator() ( const Index< i, Dim >  index1,
const int  N1,
const int  N2,
const int  N3 
)

Definition at line 267 of file Ddg_pointer.hpp.

269  {
270  using TensorExpr
271  = Ddg_numeral_123<Ddg<T *, Tensor_Dim01, Tensor_Dim23>, T>;
273  TensorExpr(*this, N1, N2, N3));
274  }

◆ operator()() [12/13]

template<class T , int Tensor_Dim01, int Tensor_Dim23>
template<char i, int Dim>
Tensor1_Expr<Ddg_numeral_123<Ddg<T *, Tensor_Dim01, Tensor_Dim23>, T>, T, Dim, i> FTensor::Ddg< T *, Tensor_Dim01, Tensor_Dim23 >::operator() ( const int  N1,
const Index< i, Dim >  index1,
const int  N2,
const int  N3 
)

Definition at line 279 of file Ddg_pointer.hpp.

281  {
282  using TensorExpr
283  = Ddg_numeral_123<Ddg<T *, Tensor_Dim01, Tensor_Dim23>, T>;
285  TensorExpr(*this, N1, N2, N3));
286  }

◆ operator()() [13/13]

template<class T , int Tensor_Dim01, int Tensor_Dim23>
template<char i, char j, char k, int Dim1, int Dim23>
Dg_Expr<Ddg_numeral_0<const Ddg<T *, Tensor_Dim01, Tensor_Dim23>, T>, T, Dim23, Dim1, i, j, k> FTensor::Ddg< T *, Tensor_Dim01, Tensor_Dim23 >::operator() ( const int  N0,
const Index< k, Dim1 >  index3,
const Index< i, Dim23 >  index1,
const Index< j, Dim23 >  index2 
) const

Definition at line 295 of file Ddg_pointer.hpp.

298  {
299  using TensorExpr
300  = Ddg_numeral_0<const Ddg<T *, Tensor_Dim01, Tensor_Dim23>, T>;
301  return Dg_Expr<TensorExpr, T, Dim23, Dim1, i, j, k>(
302  TensorExpr(*this, N0));
303  }

◆ operator++()

template<class T , int Tensor_Dim01, int Tensor_Dim23>
const Ddg<T *, Tensor_Dim01, Tensor_Dim23>& FTensor::Ddg< T *, Tensor_Dim01, Tensor_Dim23 >::operator++ ( ) const

Definition at line 308 of file Ddg_pointer.hpp.

309  {
310  for(int i = 0; i < (Tensor_Dim01 * (Tensor_Dim01 + 1)) / 2; ++i)
311  for(int j = 0; j < (Tensor_Dim01 * (Tensor_Dim01 + 1)) / 2; ++j)
312  data[i][j] += inc;
313  return *this;
314  }
T *restrict data[(Tensor_Dim01 *(Tensor_Dim01+1))/2][(Tensor_Dim23 *(Tensor_Dim23+1))/2]
Definition: Ddg_pointer.hpp:12

◆ ptr()

template<class T , int Tensor_Dim01, int Tensor_Dim23>
T* restrict& FTensor::Ddg< T *, Tensor_Dim01, Tensor_Dim23 >::ptr ( const int  N1,
const int  N2,
const int  N3,
const int  N4 
) const

Definition at line 130 of file Ddg_pointer.hpp.

131  {
132 #ifdef FTENSOR_DEBUG
133  if(N1 >= Tensor_Dim01 || N1 < 0 || N2 >= Tensor_Dim01 || N2 < 0
134  || N3 >= Tensor_Dim23 || N3 < 0 || N4 >= Tensor_Dim23 || N4 < 0)
135  {
136  std::stringstream s;
137  s << "Bad index in Dg<T," << Tensor_Dim01 << "," << Tensor_Dim23
138  << ">.ptr(" << N1 << "," << N2 << "," << N3 << "," << N4 << ")"
139  << std::endl;
140  throw std::out_of_range(s.str());
141  }
142 #endif
143  return N1 > N2
144  ? (N3 > N4 ? data[N1 + (N2 * (2 * Tensor_Dim01 - N2 - 1)) / 2]
145  [N3 + (N4 * (2 * Tensor_Dim23 - N4 - 1)) / 2]
146  : data[N1 + (N2 * (2 * Tensor_Dim01 - N2 - 1)) / 2]
147  [N4 + (N3 * (2 * Tensor_Dim23 - N3 - 1)) / 2])
148  : (N3 > N4 ? data[N2 + (N1 * (2 * Tensor_Dim01 - N1 - 1)) / 2]
149  [N3 + (N4 * (2 * Tensor_Dim23 - N4 - 1)) / 2]
150  : data[N2 + (N1 * (2 * Tensor_Dim01 - N1 - 1)) / 2]
151  [N4 + (N3 * (2 * Tensor_Dim23 - N3 - 1)) / 2]);
152  }
T *restrict data[(Tensor_Dim01 *(Tensor_Dim01+1))/2][(Tensor_Dim23 *(Tensor_Dim23+1))/2]
Definition: Ddg_pointer.hpp:12

Member Data Documentation

◆ data

template<class T , int Tensor_Dim01, int Tensor_Dim23>
T* restrict FTensor::Ddg< T *, Tensor_Dim01, Tensor_Dim23 >::data[(Tensor_Dim01 *(Tensor_Dim01+1))/2][(Tensor_Dim23 *(Tensor_Dim23+1))/2]
mutableprivate

Definition at line 12 of file Ddg_pointer.hpp.

◆ inc

template<class T , int Tensor_Dim01, int Tensor_Dim23>
const int FTensor::Ddg< T *, Tensor_Dim01, Tensor_Dim23 >::inc
private

Definition at line 10 of file Ddg_pointer.hpp.


The documentation for this class was generated from the following file: