mirror of
				https://github.com/paboyle/Grid.git
				synced 2025-10-31 12:04:33 +00:00 
			
		
		
		
	real comps and expression comps
This commit is contained in:
		| @@ -11,7 +11,11 @@ namespace Grid { | |||||||
|     //Query supporting bitwise &, |, ^, ! |     //Query supporting bitwise &, |, ^, ! | ||||||
|     //Query supporting logical &&, ||,  |     //Query supporting logical &&, ||,  | ||||||
|     ////////////////////////////////////////////////////////////////////////// |     ////////////////////////////////////////////////////////////////////////// | ||||||
|     template<class vfunctor,class lobj,class robj>  |  | ||||||
|  |   ////////////////////////////////////////////////////////////////////////// | ||||||
|  |   // compare lattice to lattice | ||||||
|  |   ////////////////////////////////////////////////////////////////////////// | ||||||
|  |   template<class vfunctor,class lobj,class robj>   | ||||||
|     inline Lattice<vInteger> LLComparison(vfunctor op,const Lattice<lobj> &lhs,const Lattice<robj> &rhs) |     inline Lattice<vInteger> LLComparison(vfunctor op,const Lattice<lobj> &lhs,const Lattice<robj> &rhs) | ||||||
|     { |     { | ||||||
|       Lattice<vInteger> ret(rhs._grid); |       Lattice<vInteger> ret(rhs._grid); | ||||||
| @@ -21,6 +25,9 @@ PARALLEL_FOR_LOOP | |||||||
|         } |         } | ||||||
|         return ret; |         return ret; | ||||||
|     } |     } | ||||||
|  |   ////////////////////////////////////////////////////////////////////////// | ||||||
|  |   // compare lattice to scalar | ||||||
|  |   ////////////////////////////////////////////////////////////////////////// | ||||||
|     template<class vfunctor,class lobj,class robj>  |     template<class vfunctor,class lobj,class robj>  | ||||||
|     inline Lattice<vInteger> LSComparison(vfunctor op,const Lattice<lobj> &lhs,const robj &rhs) |     inline Lattice<vInteger> LSComparison(vfunctor op,const Lattice<lobj> &lhs,const robj &rhs) | ||||||
|     { |     { | ||||||
| @@ -31,6 +38,9 @@ PARALLEL_FOR_LOOP | |||||||
|         } |         } | ||||||
|         return ret; |         return ret; | ||||||
|     } |     } | ||||||
|  |   ////////////////////////////////////////////////////////////////////////// | ||||||
|  |   // compare scalar to lattice | ||||||
|  |   ////////////////////////////////////////////////////////////////////////// | ||||||
|     template<class vfunctor,class lobj,class robj>  |     template<class vfunctor,class lobj,class robj>  | ||||||
|     inline Lattice<vInteger> SLComparison(vfunctor op,const lobj &lhs,const Lattice<robj> &rhs) |     inline Lattice<vInteger> SLComparison(vfunctor op,const lobj &lhs,const Lattice<robj> &rhs) | ||||||
|     { |     { | ||||||
| @@ -42,6 +52,9 @@ PARALLEL_FOR_LOOP | |||||||
|         return ret; |         return ret; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |   ////////////////////////////////////////////////////////////////////////// | ||||||
|  |   // Map to functors | ||||||
|  |   ////////////////////////////////////////////////////////////////////////// | ||||||
|     // Less than |     // Less than | ||||||
|    template<class lobj,class robj> |    template<class lobj,class robj> | ||||||
|    inline Lattice<vInteger> operator < (const Lattice<lobj> & lhs, const Lattice<robj> & rhs) { |    inline Lattice<vInteger> operator < (const Lattice<lobj> & lhs, const Lattice<robj> & rhs) { | ||||||
| @@ -99,7 +112,6 @@ PARALLEL_FOR_LOOP | |||||||
|      return SLComparison(vge<lobj,robj>(),lhs,rhs); |      return SLComparison(vge<lobj,robj>(),lhs,rhs); | ||||||
|    } |    } | ||||||
|  |  | ||||||
|  |  | ||||||
|    // equal |    // equal | ||||||
|    template<class lobj,class robj> |    template<class lobj,class robj> | ||||||
|    inline Lattice<vInteger> operator == (const Lattice<lobj> & lhs, const Lattice<robj> & rhs) { |    inline Lattice<vInteger> operator == (const Lattice<lobj> & lhs, const Lattice<robj> & rhs) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user