QMCPACK
VectorSoaContainer< T, D, Alloc >::Accessor Struct Reference

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

+ Collaboration diagram for VectorSoaContainer< T, D, Alloc >::Accessor:

Public Member Functions

 Accessor (T *a, size_type ng)
 
template<typename T1 >
Accessoroperator= (const TinyVector< T1, D > &rhs)
 
template<typename T1 >
Accessoroperator= (const T1 rhs)
 assign value More...
 

Public Attributes

T * _base
 
size_type M
 

Detailed Description

template<typename T, unsigned D, typename Alloc = aligned_allocator<T>>
struct qmcplusplus::VectorSoaContainer< T, D, Alloc >::Accessor

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

Definition at line 231 of file VectorSoaContainer.h.

Constructor & Destructor Documentation

◆ Accessor()

Accessor ( T *  a,
size_type  ng 
)
inline

Member Function Documentation

◆ operator=() [1/2]

Accessor& operator= ( const TinyVector< T1, D > &  rhs)
inline

Definition at line 237 of file VectorSoaContainer.h.

References VectorSoaContainer< T, D, Alloc >::Accessor::_base, and VectorSoaContainer< T, D, Alloc >::Accessor::M.

238  {
239 #pragma unroll
240  for (size_type i = 0; i < D; ++i)
241  *(_base + M * i) = rhs[i];
242  return *this;
243  }

◆ operator=() [2/2]

Accessor& operator= ( const T1  rhs)
inline

assign value

Definition at line 247 of file VectorSoaContainer.h.

References VectorSoaContainer< T, D, Alloc >::Accessor::_base, and VectorSoaContainer< T, D, Alloc >::Accessor::M.

248  {
249 #pragma unroll
250  for (size_type i = 0; i < D; ++i)
251  *(_base + M * i) = rhs;
252  return *this;
253  }

Member Data Documentation

◆ _base

T* _base

◆ M


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