v0.8.4
Public Member Functions | Private Attributes | List of all members
FTensor::Tensor3< PackPtr< T *, I >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > Class Template Reference

#include <src/ftensor/src/FTensor/Tensor3/Tensor3_pointer.hpp>

Public Member Functions

 Tensor3 ()
 
 Tensor3 (T *d000, T *d001, T *d010, T *d011, T *d100, T *d101, T *d110, T *d111)
 
 Tensor3 (T *d000, T *d001, T *d002, T *d010, T *d011, T *d012, T *d020, T *d021, T *d022, T *d100, T *d101, T *d102, T *d110, T *d111, T *d112, T *d120, T *d121, T *d122, T *d200, T *d201, T *d202, T *d210, T *d211, T *d212, T *d220, T *d221, T *d222)
 
 Tensor3 (T *d000, T *d001, T *d002, T *d003, T *d010, T *d011, T *d012, T *d013, T *d020, T *d021, T *d022, T *d023, T *d030, T *d031, T *d032, T *d033, T *d100, T *d101, T *d102, T *d103, T *d110, T *d111, T *d112, T *d113, T *d120, T *d121, T *d122, T *d123, T *d130, T *d131, T *d132, T *d133, T *d200, T *d201, T *d202, T *d203, T *d210, T *d211, T *d212, T *d213, T *d220, T *d221, T *d222, T *d223, T *d230, T *d231, T *d232, T *d233, T *d300, T *d301, T *d302, T *d303, T *d310, T *d311, T *d312, T *d313, T *d320, T *d321, T *d322, T *d323, T *d330, T *d331, T *d332, T *d333)
 
T & operator() (const int N1, const int N2, const int N3)
 
operator() (const int N1, const int N2, const int N3) const
 
template<char i, char j, char k, int Dim0, int Dim1, int Dim2>
Tensor3_Expr< Tensor3< PackPtr< T *, I >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k > operator() (const Index< i, Dim0 >, const Index< j, Dim1 >, const Index< k, Dim2 >)
 
template<char i, char j, char k, int Dim0, int Dim1, int Dim2>
Tensor3_Expr< const Tensor3< PackPtr< T *, I >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k > operator() (const Index< i, Dim0 >, const Index< j, Dim1 >, const Index< k, Dim2 >) const
 
template<int Current_Dim0, int Current_Dim1, int Current_Dim2>
void increment (const Number< Current_Dim0 > &, const Number< Current_Dim1 > &, const Number< Current_Dim2 > &) const
 
const Tensor3< PackPtr< T *, I >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > & operator++ () const
 

Private Attributes

T *restrict data [Tensor_Dim1][Tensor_Dim1][Tensor_Dim2]
 

Detailed Description

template<class T, int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int I>
class FTensor::Tensor3< PackPtr< T *, I >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >

Definition at line 51 of file Tensor3_pointer.hpp.

Constructor & Destructor Documentation

◆ Tensor3() [1/4]

template<class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int I>
FTensor::Tensor3< PackPtr< T *, I >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >::Tensor3 ( )

Definition at line 56 of file Tensor3_pointer.hpp.

56 {}

◆ Tensor3() [2/4]

template<class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int I>
FTensor::Tensor3< PackPtr< T *, I >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >::Tensor3 ( T *  d000,
T *  d001,
T *  d010,
T *  d011,
T *  d100,
T *  d101,
T *  d110,
T *  d111 
)

Definition at line 59 of file Tensor3_pointer.hpp.

61  {
62  Tensor3_constructor<T * restrict, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>(
63  data, d000, d001, d010, d011, d100, d101, d110, d111);
64  }

◆ Tensor3() [3/4]

template<class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int I>
FTensor::Tensor3< PackPtr< T *, I >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >::Tensor3 ( T *  d000,
T *  d001,
T *  d002,
T *  d010,
T *  d011,
T *  d012,
T *  d020,
T *  d021,
T *  d022,
T *  d100,
T *  d101,
T *  d102,
T *  d110,
T *  d111,
T *  d112,
T *  d120,
T *  d121,
T *  d122,
T *  d200,
T *  d201,
T *  d202,
T *  d210,
T *  d211,
T *  d212,
T *  d220,
T *  d221,
T *  d222 
)

Definition at line 67 of file Tensor3_pointer.hpp.

71  {
72  Tensor3_constructor<T * restrict, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>(
73  data, d000, d001, d002, d010, d011, d012, d020, d021, d022, d100, d101,
74  d102, d110, d111, d112, d120, d121, d122, d200, d201, d202, d210, d211,
75  d212, d220, d221, d222);
76  }

◆ Tensor3() [4/4]

template<class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int I>
FTensor::Tensor3< PackPtr< T *, I >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >::Tensor3 ( T *  d000,
T *  d001,
T *  d002,
T *  d003,
T *  d010,
T *  d011,
T *  d012,
T *  d013,
T *  d020,
T *  d021,
T *  d022,
T *  d023,
T *  d030,
T *  d031,
T *  d032,
T *  d033,
T *  d100,
T *  d101,
T *  d102,
T *  d103,
T *  d110,
T *  d111,
T *  d112,
T *  d113,
T *  d120,
T *  d121,
T *  d122,
T *  d123,
T *  d130,
T *  d131,
T *  d132,
T *  d133,
T *  d200,
T *  d201,
T *  d202,
T *  d203,
T *  d210,
T *  d211,
T *  d212,
T *  d213,
T *  d220,
T *  d221,
T *  d222,
T *  d223,
T *  d230,
T *  d231,
T *  d232,
T *  d233,
T *  d300,
T *  d301,
T *  d302,
T *  d303,
T *  d310,
T *  d311,
T *  d312,
T *  d313,
T *  d320,
T *  d321,
T *  d322,
T *  d323,
T *  d330,
T *  d331,
T *  d332,
T *  d333 
)

Definition at line 79 of file Tensor3_pointer.hpp.

91  {
92  Tensor3_constructor<T * restrict, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>(
93  data, d000, d001, d002, d003, d010, d011, d012, d013, d020, d021, d022,
94  d023, d030, d031, d032, d033,
95 
96  d100, d101, d102, d103, d110, d111, d112, d113, d120, d121, d122, d123,
97  d130, d131, d132, d133,
98 
99  d200, d201, d202, d203, d210, d211, d212, d213, d220, d221, d222, d223,
100  d230, d231, d232, d233,
101 
102  d300, d301, d302, d303, d310, d311, d312, d313, d320, d321, d322, d323,
103  d330, d331, d332, d333);
104  }

Member Function Documentation

◆ increment()

template<class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int I>
template<int Current_Dim0, int Current_Dim1, int Current_Dim2>
void FTensor::Tensor3< PackPtr< T *, I >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >::increment ( const Number< Current_Dim0 > &  ,
const Number< Current_Dim1 > &  ,
const Number< Current_Dim2 > &   
) const

Definition at line 172 of file Tensor3_pointer.hpp.

174  {
175  data[Current_Dim0 - 1][Current_Dim1 - 1][Current_Dim2 - 1] += I;
176  }

◆ operator()() [1/4]

template<class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int I>
T& FTensor::Tensor3< PackPtr< T *, I >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >::operator() ( const int  N1,
const int  N2,
const int  N3 
)

Definition at line 109 of file Tensor3_pointer.hpp.

110  {
111 #ifdef FTENSOR_DEBUG
112  if(N1 >= Tensor_Dim0 || N1 < 0 || N2 >= Tensor_Dim1 || N2 < 0
113  || N3 >= Tensor_Dim2 || N3 < 0)
114  {
115  std::stringstream s;
116  s << "Bad index in Tensor3<T," << Tensor_Dim0 << "," << Tensor_Dim1
117  << "," << Tensor_Dim2 << ">.operator(" << N1 << "," << N2 << ","
118  << N3 << ")" << std::endl;
119  throw std::runtime_error(s.str());
120  }
121 #endif
122  return *data[N1][N2][N3];
123  }

◆ operator()() [2/4]

template<class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int I>
T FTensor::Tensor3< PackPtr< T *, I >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >::operator() ( const int  N1,
const int  N2,
const int  N3 
) const

Definition at line 125 of file Tensor3_pointer.hpp.

126  {
127 #ifdef FTENSOR_DEBUG
128  if(N1 >= Tensor_Dim0 || N1 < 0 || N2 >= Tensor_Dim1 || N2 < 0
129  || N3 >= Tensor_Dim2 || N3 < 0)
130  {
131  std::stringstream s;
132  s << "Bad index in Tensor3<T," << Tensor_Dim0 << "," << Tensor_Dim1
133  << "," << Tensor_Dim2 << ">.operator(" << N1 << "," << N2 << ","
134  << N3 << ") const" << std::endl;
135  throw std::runtime_error(s.str());
136  }
137 #endif
138  return *data[N1][N2][N3];
139  }

◆ operator()() [3/4]

template<class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int I>
template<char i, char j, char k, int Dim0, int Dim1, int Dim2>
Tensor3_Expr<Tensor3<PackPtr<T *, I>, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>, T, Dim0, Dim1, Dim2, i, j, k> FTensor::Tensor3< PackPtr< T *, I >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >::operator() ( const Index< i, Dim0 >  ,
const Index< j, Dim1 >  ,
const Index< k, Dim2 >   
)

Definition at line 147 of file Tensor3_pointer.hpp.

149  {
150  return Tensor3_Expr<
151  Tensor3<PackPtr<T *, I>, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>, T,
152  Dim0, Dim1, Dim2, i, j, k>(*this);
153  }

◆ operator()() [4/4]

template<class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int I>
template<char i, char j, char k, int Dim0, int Dim1, int Dim2>
Tensor3_Expr< const Tensor3<PackPtr<T *, I>, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>, T, Dim0, Dim1, Dim2, i, j, k> FTensor::Tensor3< PackPtr< T *, I >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >::operator() ( const Index< i, Dim0 >  ,
const Index< j, Dim1 >  ,
const Index< k, Dim2 >   
) const

Definition at line 159 of file Tensor3_pointer.hpp.

161  {
162  return Tensor3_Expr<
163  const Tensor3<PackPtr<T *, I>, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>,
164  T, Dim0, Dim1, Dim2, i, j, k>(*this);
165  }

◆ operator++()

template<class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int I>
const Tensor3<PackPtr<T *, I>, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>& FTensor::Tensor3< PackPtr< T *, I >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >::operator++ ( ) const

Definition at line 179 of file Tensor3_pointer.hpp.

180  {
181  T3_increment(*this, Number<Tensor_Dim0>(), Number<Tensor_Dim1>(),
182  Number<Tensor_Dim2>());
183  return *this;
184  }
void T3_increment(const Tensor3< T, Dim0, Dim1, Dim2 > &iter, const Number< Current_Dim0 > &, const Number< Current_Dim1 > &, const Number< Current_Dim2 > &)

Member Data Documentation

◆ data

template<class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int I>
T* restrict FTensor::Tensor3< PackPtr< T *, I >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >::data[Tensor_Dim1][Tensor_Dim1][Tensor_Dim2]
mutableprivate

Definition at line 53 of file Tensor3_pointer.hpp.


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