From 755002da9c8bc892ab930b3e8a16538b64c4b480 Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Mon, 25 Sep 2023 17:16:33 -0400 Subject: [PATCH] Comparison convenience --- Grid/util/Coordinate.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Grid/util/Coordinate.h b/Grid/util/Coordinate.h index 05b83bf9..b79967e5 100644 --- a/Grid/util/Coordinate.h +++ b/Grid/util/Coordinate.h @@ -94,6 +94,13 @@ static constexpr int MaxDims = GRID_MAX_LATTICE_DIMENSION; typedef AcceleratorVector Coordinate; +template +inline bool operator==(const AcceleratorVector &v,const AcceleratorVector &w) +{ + if (v.size()!=w.size()) return false; + for(int i=0;i inline std::ostream & operator<<(std::ostream &os, const AcceleratorVector &v) {