From fe1d8a9dd1c8745b02c912dcbf66ee9cd9c46e93 Mon Sep 17 00:00:00 2001 From: Azusa Yamaguchi Date: Sun, 14 Jun 2015 01:05:57 +0100 Subject: [PATCH] real comps and expression comps --- lib/lattice/Lattice_comparison.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/lib/lattice/Lattice_comparison.h b/lib/lattice/Lattice_comparison.h index 431cf911..604ea4b9 100644 --- a/lib/lattice/Lattice_comparison.h +++ b/lib/lattice/Lattice_comparison.h @@ -11,7 +11,11 @@ namespace Grid { //Query supporting bitwise &, |, ^, ! //Query supporting logical &&, ||, ////////////////////////////////////////////////////////////////////////// - template + + ////////////////////////////////////////////////////////////////////////// + // compare lattice to lattice + ////////////////////////////////////////////////////////////////////////// + template inline Lattice LLComparison(vfunctor op,const Lattice &lhs,const Lattice &rhs) { Lattice ret(rhs._grid); @@ -21,6 +25,9 @@ PARALLEL_FOR_LOOP } return ret; } + ////////////////////////////////////////////////////////////////////////// + // compare lattice to scalar + ////////////////////////////////////////////////////////////////////////// template inline Lattice LSComparison(vfunctor op,const Lattice &lhs,const robj &rhs) { @@ -31,6 +38,9 @@ PARALLEL_FOR_LOOP } return ret; } + ////////////////////////////////////////////////////////////////////////// + // compare scalar to lattice + ////////////////////////////////////////////////////////////////////////// template inline Lattice SLComparison(vfunctor op,const lobj &lhs,const Lattice &rhs) { @@ -42,6 +52,9 @@ PARALLEL_FOR_LOOP return ret; } + ////////////////////////////////////////////////////////////////////////// + // Map to functors + ////////////////////////////////////////////////////////////////////////// // Less than template inline Lattice operator < (const Lattice & lhs, const Lattice & rhs) { @@ -99,7 +112,6 @@ PARALLEL_FOR_LOOP return SLComparison(vge(),lhs,rhs); } - // equal template inline Lattice operator == (const Lattice & lhs, const Lattice & rhs) {