QMCPACK
OhmmsArray.h File Reference
+ Include dependency graph for OhmmsArray.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Array< T, D, ALLOC >
 A D-dimensional Array class based on PETE. More...
 

Functions

template<class T , unsigned D, class Alloc >
bool operator== (const Array< T, D, Alloc > &lhs, const Array< T, D, Alloc > &rhs)
 
template<class T , unsigned D, class Alloc >
bool operator!= (const Array< T, D, Alloc > &lhs, const Array< T, D, Alloc > &rhs)
 

Function Documentation

◆ operator!=()

bool operator!= ( const Array< T, D, Alloc > &  lhs,
const Array< T, D, Alloc > &  rhs 
)

Definition at line 273 of file OhmmsArray.h.

274 {
276  "operator== requires host accessible Vector.");
277  return !(lhs == rhs);
278 }
template class analogous to std::allocator_traits.

◆ operator==()

bool operator== ( const Array< T, D, Alloc > &  lhs,
const Array< T, D, Alloc > &  rhs 
)

Definition at line 257 of file OhmmsArray.h.

References Array< T, D, ALLOC >::size().

258 {
260  "operator== requires host accessible Vector.");
261  if (lhs.size() == rhs.size())
262  {
263  for (int i = 0; i < rhs.size(); i++)
264  if (lhs(i) != rhs(i))
265  return false;
266  return true;
267  }
268  else
269  return false;
270 }
size_t size() const
Definition: OhmmsArray.h:57
template class analogous to std::allocator_traits.