mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-14 01:35:36 +00:00
Comparison convenience
This commit is contained in:
parent
31b8e8b437
commit
755002da9c
@ -94,6 +94,13 @@ static constexpr int MaxDims = GRID_MAX_LATTICE_DIMENSION;
|
|||||||
|
|
||||||
typedef AcceleratorVector<int,MaxDims> Coordinate;
|
typedef AcceleratorVector<int,MaxDims> Coordinate;
|
||||||
|
|
||||||
|
template<class T,int _ndim>
|
||||||
|
inline bool operator==(const AcceleratorVector<T,_ndim> &v,const AcceleratorVector<T,_ndim> &w)
|
||||||
|
{
|
||||||
|
if (v.size()!=w.size()) return false;
|
||||||
|
for(int i=0;i<v.size();i++) if ( v[i]!=w[i] ) return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
template<class T,int _ndim>
|
template<class T,int _ndim>
|
||||||
inline std::ostream & operator<<(std::ostream &os, const AcceleratorVector<T,_ndim> &v)
|
inline std::ostream & operator<<(std::ostream &os, const AcceleratorVector<T,_ndim> &v)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user