diff --git a/TODO b/TODO index b596c605..a75c867d 100644 --- a/TODO +++ b/TODO @@ -5,6 +5,7 @@ - Performance check on Guido's reimplementation strategy * FIXME audit + * const audit * Replace vset with a call to merge.; @@ -13,6 +14,8 @@ * Strong test for norm2, conj and all primitive types. -- tests/Grid_simd.cc is almost there +* Thread scaling tests Xeon, XeonPhi + ================================================================ *** New Functionality ================================================================ @@ -23,9 +26,6 @@ - use protocol buffers? replace xmlReader/Writer ec.. - Binary use htonll, htonl -* Bug in SeedFixedIntegers gave same output on each site. -- Think I fixed but NOT checked for sure - Implement and use lattice IO to verify this. - * Expression template engine: -- DONE -- Norm2(expression) problem: introduce norm2 unary op, or Introduce conversion automatic from expression to Lattice @@ -33,6 +33,7 @@ ** Make the Tensor types and Complex etc... play more nicely. - TensorRemove is a hack, come up with a long term rationalised approach to Complex vs. Scalar > > + QDP forces use of "toDouble" to get back to non tensor scalar. This role is presently taken TensorRemove, but I want to introduce a syntax that does not require this. - Reductions that contract indices on a site should always demote the tensor structure. @@ -71,6 +72,7 @@ // Fourier transform equivalent. Actions -- coherent framework for implementing actions and their forces. + * Fermion - Wilson - Clover @@ -81,22 +83,24 @@ Actions -- coherent framework for implementing actions and their forces. * Gauge - Wilson, symanzik, iwasaki -Algorithms +Algorithms (lots of reuse/port from BFM) * LinearOperator * LinearSolver * Polynomial * Eigen +* CG * Pcg * Adef2 * DeflCG * fPcg * MCR * HDCG -* HMC, Heatbath +* HMC, +* Heatbath * etc.. ====================================================================================================== -FUNCTIONALITY: it pleases me to keep track of things I have done (keeps sane) +FUNCTIONALITY: it pleases me to keep track of things I have done (keeps me arguably sane) ====================================================================================================== * Command line args for geometry, simd, etc. layout. Is it necessary to have -- DONE @@ -158,4 +162,6 @@ FUNCTIONALITY: it pleases me to keep track of things I have done (keeps sane) * Conformable test in Cshift routines. -- none needed ; there is only one * Conformable testing in expression templates -- DONE (recursive) +* Bug in SeedFixedIntegers gave same output on each site. -- DONE + Implement and use lattice IO to verify this. -- cout for lattice types DONE diff --git a/lib/Grid_simd.h b/lib/Grid_simd.h index 39265896..7ad7367b 100644 --- a/lib/Grid_simd.h +++ b/lib/Grid_simd.h @@ -234,5 +234,60 @@ namespace Grid { typedef vRealF vReal; typedef vComplexF vComplex; #endif + + + inline std::ostream& operator<< (std::ostream& stream, const vComplexF &o){ + int nn=vComplexF::Nsimd(); + std::vector > buf(nn); + vstore(o,&buf[0]); + stream<<"<"; + for(int i=0;i"; + return stream; + } + + inline std::ostream& operator<< (std::ostream& stream, const vComplexD &o){ + int nn=vComplexD::Nsimd(); + std::vector > buf(nn); + vstore(o,&buf[0]); + stream<<"<"; + for(int i=0;i"; + return stream; + } + + inline std::ostream& operator<< (std::ostream& stream, const vRealF &o){ + int nn=vRealF::Nsimd(); + std::vector > buf(nn); + vstore(o,&buf[0]); + stream<<"<"; + for(int i=0;i"; + return stream; + } + + inline std::ostream& operator<< (std::ostream& stream, const vRealD &o){ + int nn=vRealD::Nsimd(); + std::vector > buf(nn); + vstore(o,&buf[0]); + stream<<"<"; + for(int i=0;i"; + return stream; + } + + } #endif diff --git a/lib/lattice/Grid_lattice_base.h b/lib/lattice/Grid_lattice_base.h index ace7565d..915879cb 100644 --- a/lib/lattice/Grid_lattice_base.h +++ b/lib/lattice/Grid_lattice_base.h @@ -176,7 +176,27 @@ PARALLEL_FOR_LOOP } return ret; }; + }; // class Lattice + + template inline std::ostream& operator<< (std::ostream& stream, const Lattice &o){ + std::vector gcoor; + typedef typename vobj::scalar_object sobj; + sobj ss; + for(int g=0;g_gsites;g++){ + o._grid->GlobalIndexToGlobalCoor(g,gcoor); + peekSite(ss,o,gcoor); + stream<<"["; + for(int d=0;d - void peekSite(sobj &s,Lattice &l,std::vector &site){ + void peekSite(sobj &s,const Lattice &l,std::vector &site){ GridBase *grid=l._grid; diff --git a/lib/math/Grid_math_tensors.h b/lib/math/Grid_math_tensors.h index 0c1d67d1..8b3e4b1b 100644 --- a/lib/math/Grid_math_tensors.h +++ b/lib/math/Grid_math_tensors.h @@ -95,6 +95,10 @@ public: return *this; } + friend std::ostream& operator<< (std::ostream& stream, const iScalar &o){ + stream<< "S {"<>>> back to double. @@ -170,6 +174,15 @@ public: inline const vtype & operator ()(int i) const { return _internal[i]; } + friend std::ostream& operator<< (std::ostream& stream, const iVector &o){ + stream<< "V<"<{"; + for(int i=0;i &o){ + stream<< "M<"<{"; + for(int i=0;i