QMCPACK
TensorSoaContainer< T, 3 >::Accessor Struct Reference

helper class for operator ()(int i) to assign a value More...

+ Collaboration diagram for TensorSoaContainer< T, 3 >::Accessor:

Public Member Functions

 Accessor ()=delete
 
 Accessor (const Accessor &)=delete
 
 Accessor (T *a, int ng)
 
template<unsigned D>
Accessoroperator= (const Tensor< T, D > &rhs)
 
template<typename T1 >
Accessoroperator= (T1 rhs)
 assign value More...
 

Public Attributes

int M
 
T * _base
 

Detailed Description

template<typename T>
struct qmcplusplus::TensorSoaContainer< T, 3 >::Accessor

helper class for operator ()(int i) to assign a value

Definition at line 84 of file TensorSoaContainer.h.

Constructor & Destructor Documentation

◆ Accessor() [1/3]

Accessor ( )
delete

◆ Accessor() [2/3]

Accessor ( const Accessor &  )
delete

◆ Accessor() [3/3]

Accessor ( T *  a,
int  ng 
)
inline

Member Function Documentation

◆ operator=() [1/2]

Accessor& operator= ( const Tensor< T, D > &  rhs)
inline

Definition at line 93 of file TensorSoaContainer.h.

94  {
95  *_base = rhs(0);
96  *(_base + M) = rhs(1);
97  *(_base + 2 * M) = rhs(2);
98  *(_base + 3 * M) = rhs(4);
99  *(_base + 4 * M) = rhs(5);
100  *(_base + 5 * M) = rhs(8);
101  return *this;
102  }

◆ operator=() [2/2]

Accessor& operator= ( T1  rhs)
inline

assign value

Definition at line 106 of file TensorSoaContainer.h.

107  {
108  *_base = rhs;
109  *(_base + M) = rhs;
110  *(_base + 2 * M) = rhs;
111  *(_base + 3 * M) = rhs;
112  *(_base + 4 * M) = rhs;
113  *(_base + 5 * M) = rhs;
114  return *this;
115  }

Member Data Documentation

◆ _base

T* _base

Definition at line 87 of file TensorSoaContainer.h.

◆ M

int M

Definition at line 86 of file TensorSoaContainer.h.


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