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

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

Inheritance diagram for FTensor::Tensor3< T *, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >:
[legend]
Collaboration diagram for FTensor::Tensor3< T *, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >:
[legend]

Public Member Functions

 Tensor3 ()
 
 Tensor3 (T *d000, T *d001, T *d010, T *d011, T *d100, T *d101, T *d110, T *d111, const int i=1)
 
 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, const int i=1)
 
 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, const int i=1)
 
Toperator() (const int N1, const int N2, const int N3)
 
T 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< T *, 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< T *, 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 Tensor3operator++ () const
 

Protected Attributes

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

Private Attributes

const int inc
 

Detailed Description

template<class T, int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2>
class FTensor::Tensor3< T *, 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>
FTensor::Tensor3< T *, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >::Tensor3 ( )

Definition at line 60 of file Tensor3_pointer.hpp.

60 {}

◆ Tensor3() [2/4]

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

Definition at line 63 of file Tensor3_pointer.hpp.

65  : inc(i)
66  {
67  Tensor3_constructor<T * restrict, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>(
68  data, d000, d001, d010, d011, d100, d101, d110, d111);
69  }
T *restrict data[Tensor_Dim1][Tensor_Dim1][Tensor_Dim2]

◆ Tensor3() [3/4]

template<class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2>
FTensor::Tensor3< T *, 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,
const int  i = 1 
)

Definition at line 72 of file Tensor3_pointer.hpp.

77  : inc(i)
78  {
79  Tensor3_constructor<T * restrict, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>(
80  data, d000, d001, d002, d010, d011, d012, d020, d021, d022, d100, d101,
81  d102, d110, d111, d112, d120, d121, d122, d200, d201, d202, d210, d211,
82  d212, d220, d221, d222);
83  }
T *restrict data[Tensor_Dim1][Tensor_Dim1][Tensor_Dim2]

◆ Tensor3() [4/4]

template<class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2>
FTensor::Tensor3< T *, 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,
const int  i = 1 
)

Definition at line 86 of file Tensor3_pointer.hpp.

101  : inc(i)
102  {
103  Tensor3_constructor<T * restrict, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>(
104  data, d000, d001, d002, d003, d010, d011, d012, d013, d020, d021, d022,
105  d023, d030, d031, d032, d033,
106 
107  d100, d101, d102, d103, d110, d111, d112, d113, d120, d121, d122, d123,
108  d130, d131, d132, d133,
109 
110  d200, d201, d202, d203, d210, d211, d212, d213, d220, d221, d222, d223,
111  d230, d231, d232, d233,
112 
113  d300, d301, d302, d303, d310, d311, d312, d313, d320, d321, d322, d323,
114  d330, d331, d332, d333);
115  }
T *restrict data[Tensor_Dim1][Tensor_Dim1][Tensor_Dim2]

Member Function Documentation

◆ increment()

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

Definition at line 181 of file Tensor3_pointer.hpp.

183  {
184  data[Current_Dim0 - 1][Current_Dim1 - 1][Current_Dim2 - 1] += inc;
185  }
T *restrict data[Tensor_Dim1][Tensor_Dim1][Tensor_Dim2]

◆ operator()() [1/4]

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

Definition at line 120 of file Tensor3_pointer.hpp.

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

◆ operator()() [2/4]

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

Definition at line 136 of file Tensor3_pointer.hpp.

137  {
138 #ifdef FTENSOR_DEBUG
139  if(N1 >= Tensor_Dim0 || N1 < 0 || N2 >= Tensor_Dim1 || N2 < 0
140  || N3 >= Tensor_Dim2 || N3 < 0)
141  {
142  std::stringstream s;
143  s << "Bad index in Tensor3<T," << Tensor_Dim0 << "," << Tensor_Dim1
144  << "," << Tensor_Dim2 << ">.operator(" << N1 << "," << N2 << ","
145  << N3 << ") const" << std::endl;
146  throw std::runtime_error(s.str());
147  }
148 #endif
149  return *data[N1][N2][N3];
150  }
T *restrict data[Tensor_Dim1][Tensor_Dim1][Tensor_Dim2]

◆ operator()() [3/4]

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

Definition at line 158 of file Tensor3_pointer.hpp.

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

◆ operator()() [4/4]

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

Definition at line 168 of file Tensor3_pointer.hpp.

170  {
171  return Tensor3_Expr<
172  const Tensor3<T *, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>, T, Dim0,
173  Dim1, Dim2, i, j, k>(*this);
174  }

◆ operator++()

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

Definition at line 187 of file Tensor3_pointer.hpp.

187  {
188  T3_increment(*this, Number<Tensor_Dim0>(), Number<Tensor_Dim1>(),
189  Number<Tensor_Dim2>());
190  return *this;
191  }
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>
T* restrict FTensor::Tensor3< T *, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >::data[Tensor_Dim1][Tensor_Dim1][Tensor_Dim2]
mutableprotected

Definition at line 57 of file Tensor3_pointer.hpp.

◆ inc

template<class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2>
const int FTensor::Tensor3< T *, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >::inc
private

Definition at line 53 of file Tensor3_pointer.hpp.


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