mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-15 06:17:05 +01:00
Remove warnings under NVCC and move parallel_for to thread-loop
This commit is contained in:
@ -49,7 +49,7 @@ public:
|
||||
double , M5,
|
||||
double , b,
|
||||
double , c,
|
||||
std::vector<std::complex<double>>, omega,
|
||||
std::vector<std::complex<double> >, omega,
|
||||
std::string , boundary,
|
||||
std::string , twist);
|
||||
};
|
||||
@ -131,9 +131,28 @@ void TZMobiusDWF<FImpl>::setup(void)
|
||||
typename ZMobiusFermion<FImpl>::ImplParams implParams;
|
||||
implParams.boundary_phases = strToVec<Complex>(par().boundary);
|
||||
implParams.twist_n_2pi_L = strToVec<Real>(par().twist);
|
||||
envCreateDerived(FMat, ZMobiusFermion<FImpl>, getName(), par().Ls, U, g5,
|
||||
grb5, g4, grb4, par().mass, par().M5, omega,
|
||||
par().b, par().c, implParams);
|
||||
|
||||
assert(par().Ls==omega.size());
|
||||
int Ls=par().Ls;
|
||||
std::vector<ComplexD> _omega(Ls);
|
||||
for(int i=0;i<Ls;i++){
|
||||
_omega[i] = omega[i];
|
||||
}
|
||||
envCreateDerived(FMat, ZMobiusFermion<FImpl>, getName(), par().Ls,
|
||||
U, g5, grb5, g4, grb4,
|
||||
par().mass, par().M5,
|
||||
_omega, par().b, par().c, implParams);
|
||||
|
||||
/*
|
||||
ZMobiusFermion(GaugeField &_Umu,
|
||||
GridCartesian &FiveDimGrid,
|
||||
GridRedBlackCartesian &FiveDimRedBlackGrid,
|
||||
GridCartesian &FourDimGrid,
|
||||
GridRedBlackCartesian &FourDimRedBlackGrid,
|
||||
RealD _mass,RealD _M5,
|
||||
std::vector<ComplexD> &gamma, RealD b,RealD c,const ImplParams &p= ImplParams()) :
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
// execution ///////////////////////////////////////////////////////////////////
|
||||
|
@ -140,8 +140,8 @@ void TFourQuark<FImpl1, FImpl2>::tensorprod(LatticeSpinColourSpinColourMatrix &l
|
||||
auto lret_v = lret.View();
|
||||
auto a_v = a.View();
|
||||
auto b_v = b.View();
|
||||
parallel_for(auto site=lret_v.begin();site<lret_v.end();site++) {
|
||||
vTComplex left;
|
||||
thread_loop( (auto site=lret_v.begin();site<lret_v.end();site++) ,{
|
||||
vTComplex left;
|
||||
for(int si=0; si < Ns; ++si){
|
||||
for(int sj=0; sj < Ns; ++sj){
|
||||
for (int ci=0; ci < Nc; ++ci){
|
||||
@ -152,7 +152,7 @@ void TFourQuark<FImpl1, FImpl2>::tensorprod(LatticeSpinColourSpinColourMatrix &l
|
||||
lret_v[site]()(si,sj)(ci,cj)=left()*b_v[site]();
|
||||
}}
|
||||
}}
|
||||
}
|
||||
});
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -68,6 +68,7 @@ private:
|
||||
class OperatorFunctionWrapper: public OperatorFunction<Field>
|
||||
{
|
||||
public:
|
||||
using OperatorFunction<Field>::operator();
|
||||
OperatorFunctionWrapper(LinearFunction<Field> &fn): fn_(fn) {};
|
||||
virtual ~OperatorFunctionWrapper(void) = default;
|
||||
virtual void operator()(LinearOperatorBase<Field> &op,
|
||||
|
Reference in New Issue
Block a user