diff --git a/lib/lattice/Lattice_reality.h b/lib/lattice/Lattice_reality.h index 2f52ed22..4ad6fb7b 100644 --- a/lib/lattice/Lattice_reality.h +++ b/lib/lattice/Lattice_reality.h @@ -48,5 +48,16 @@ PARALLEL_FOR_LOOP } + template inline auto Ta(const Lattice &z) -> Lattice + { + Lattice ret(z._grid); +PARALLEL_FOR_LOOP + for(int ss=0;ssoSites();ss++){ + ret._odata[ss] = Ta(z._odata[ss]); + } + return ret; + } + + } #endif diff --git a/lib/tensors/Tensor_Ta.h b/lib/tensors/Tensor_Ta.h index ef4b86e1..3a903364 100644 --- a/lib/tensors/Tensor_Ta.h +++ b/lib/tensors/Tensor_Ta.h @@ -5,10 +5,10 @@ namespace Grid { /////////////////////////////////////////////// // Ta function for scalar, vector, matrix /////////////////////////////////////////////// - /* inline ComplexF Ta( const ComplexF &arg){ return arg;} */ - /* inline ComplexD Ta( const ComplexD &arg){ return arg;} */ - /* inline RealF Ta( const RealF &arg){ return arg;} */ - /* inline RealD Ta( const RealD &arg){ return arg;} */ + inline ComplexF Ta( const ComplexF &arg){ return arg;} + inline ComplexD Ta( const ComplexD &arg){ return arg;} + inline RealF Ta( const RealF &arg){ return arg;} + inline RealD Ta( const RealD &arg){ return arg;} template inline iScalar Ta(const iScalar&r) @@ -28,8 +28,13 @@ namespace Grid { template inline iMatrix Ta(const iMatrix &arg) { iMatrix ret(arg); - vtype factor = (1/(double)N); - ret = (ret - adj(arg))*0.5; + double factor = (1/(double)N); + for(int c1=0;c1(scm); - random(SerialRNG, cm); - std::cout << cm << std::endl; + //random(SerialRNG, cm); + //std::cout << cm << std::endl; cm = Ta(cm); - //cm = adj(cm); - TComplex tracecm= trace(cm); - std::cout << cm << " "<< tracecm << std::endl; + //TComplex tracecm= trace(cm); + //std::cout << cm << " "<< tracecm << std::endl; // Foo = Foo+scalar; // LatticeColourMatrix+Scalar