diff --git a/lib/algorithms/LinearOperator.h b/lib/algorithms/LinearOperator.h index c9410410..96b1ed1a 100644 --- a/lib/algorithms/LinearOperator.h +++ b/lib/algorithms/LinearOperator.h @@ -51,7 +51,7 @@ namespace Grid { virtual void Op (const Field &in, Field &out) = 0; // Abstract base virtual void AdjOp (const Field &in, Field &out) = 0; // Abstract base - virtual void HermOpAndNorm(const Field &in, Field &out,RealD &n1,RealD &n2); + virtual void HermOpAndNorm(const Field &in, Field &out,RealD &n1,RealD &n2) = 0; virtual void HermOp(const Field &in, Field &out)=0; }; diff --git a/lib/lattice/Lattice_reduction.h b/lib/lattice/Lattice_reduction.h index 7e169baf..3be4b6cb 100644 --- a/lib/lattice/Lattice_reduction.h +++ b/lib/lattice/Lattice_reduction.h @@ -46,28 +46,29 @@ inline ComplexD innerProduct(const Lattice &left,const Lattice &righ GridBase *grid = left._grid; const int pad = 8; - scalar_type nrm; - std::vector > sumarray(grid->SumArraySize()*pad); + ComplexD inner; + Vector sumarray(grid->SumArraySize()*pad); parallel_for(int thr=0;thrSumArraySize();thr++){ int nwork, mywork, myoff; GridThread::GetWork(left._grid->oSites(),thr,mywork,myoff); - decltype(innerProductD(left._odata[0],right._odata[0])) vnrm=zero; // private to thread; sub summation + decltype(innerProductD(left._odata[0],right._odata[0])) vinner=zero; // private to thread; sub summation for(int ss=myoff;ssSumArraySize();i++){ - nrm = nrm+sumarray[i*pad]; + inner = inner+sumarray[i*pad]; } - right._grid->GlobalSum(nrm); - return nrm; + right._grid->GlobalSum(inner); + return inner; } /////////////////////////