mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
Fixes to enable GPU build. NB: Contractor and ContractorBenchmark still not working
This commit is contained in:
parent
88d6ff8f1d
commit
519ce19128
@ -649,7 +649,7 @@ void A2Autils<FImpl>::MesonField(TensorType &mat,
|
|||||||
int ij_dx = m+Nmom*i + Nmom*Lblock * j + Nmom*Lblock * Rblock * lt;
|
int ij_dx = m+Nmom*i + Nmom*Lblock * j + Nmom*Lblock * Rblock * lt;
|
||||||
for(int mu=0;mu<Ngamma;mu++){
|
for(int mu=0;mu<Ngamma;mu++){
|
||||||
// this is a bit slow
|
// this is a bit slow
|
||||||
mat(m,mu,t,i,j) = trace(lsSum[ij_dx]*Gamma(gammas[mu]));
|
mat(m,mu,t,i,j) = (trace(lsSum[ij_dx]*Gamma(gammas[mu])))()()();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*************************************************************************************
|
/*************************************************************************************
|
||||||
|
|
||||||
Grid physics library, www.github.com/paboyle/Grid
|
grid physics library, www.github.com/paboyle/Grid
|
||||||
|
|
||||||
Source file: Hadrons/Modules/MDistil/Distil.hpp
|
Source file: Hadrons/Modules/MDistil/Distil.hpp
|
||||||
|
|
||||||
@ -663,13 +663,24 @@ inline void RotateEigen(std::vector<LatticeColourVector> & evec)
|
|||||||
auto grid = evec[0].Grid();
|
auto grid = evec[0].Grid();
|
||||||
Coordinate siteFirst(grid->Nd(),0);
|
Coordinate siteFirst(grid->Nd(),0);
|
||||||
peekSite(cv0, evec[0], siteFirst);
|
peekSite(cv0, evec[0], siteFirst);
|
||||||
auto & cplx0 = cv0()()(0);
|
Grid::Complex cplx0 = cv0()()(0);
|
||||||
|
#ifdef GRID_NVCC
|
||||||
|
if( cplx0.imag() == 0 )
|
||||||
|
#else
|
||||||
if( std::imag(cplx0) == 0 )
|
if( std::imag(cplx0) == 0 )
|
||||||
|
#endif
|
||||||
std::cout << GridLogMessage << "RotateEigen() : Site 0 : " << cplx0 << " => already meets phase convention" << std::endl;
|
std::cout << GridLogMessage << "RotateEigen() : Site 0 : " << cplx0 << " => already meets phase convention" << std::endl;
|
||||||
else {
|
else {
|
||||||
const auto cplx0_mag = std::abs(cplx0);
|
#ifdef GRID_NVCC
|
||||||
const auto phase = std::conj(cplx0 / cplx0_mag);
|
const Real cplx0_mag = thrust::abs(cplx0);
|
||||||
std::cout << GridLogMessage << "RotateEigen() : Site 0 : |" << cplx0 << "|=" << cplx0_mag << " => phase=" << (std::arg(phase) / 3.14159265) << " pi" << std::endl;
|
const Grid::Complex phase = thrust::conj(cplx0 / cplx0_mag);
|
||||||
|
const Real argphase = thrust::arg(phase);
|
||||||
|
#else
|
||||||
|
const Real cplx0_mag = std::abs(cplx0);
|
||||||
|
const Grid::Complex phase = std::conj(cplx0 / cplx0_mag);
|
||||||
|
const Real argphase = std::arg(phase);
|
||||||
|
#endif
|
||||||
|
std::cout << GridLogMessage << "RotateEigen() : Site 0 : |" << cplx0 << "|=" << cplx0_mag << " => phase=" << (argphase / 3.14159265) << " pi" << std::endl;
|
||||||
{
|
{
|
||||||
// TODO: Only really needed on the master slice
|
// TODO: Only really needed on the master slice
|
||||||
for( int k = 0 ; k < evec.size() ; k++ )
|
for( int k = 0 ; k < evec.size() ; k++ )
|
||||||
|
@ -187,7 +187,7 @@ void TAmputate<FImpl1, FImpl2>::execute(void)
|
|||||||
result.Vamp.resize(Gamma::nGamma/2);
|
result.Vamp.resize(Gamma::nGamma/2);
|
||||||
for( int mu=0; mu < Gamma::nGamma/2; mu++){
|
for( int mu=0; mu < Gamma::nGamma/2; mu++){
|
||||||
Gamma::Algebra gam = mu;
|
Gamma::Algebra gam = mu;
|
||||||
result.Vamp[mu] = 1/12.0*trace(adj(Gamma(mu*2+1))*g5*Sout_inv*g5*vertex[mu]*Sin_inv);
|
result.Vamp[mu] = 1/12.0*trace(adj(Gamma(mu*2+1))*g5*Sout_inv*g5*vertex[mu]*Sin_inv)()()();
|
||||||
LOG(Message) << "Vamp[" << mu << "] - " << result.Vamp[mu] << std::endl;
|
LOG(Message) << "Vamp[" << mu << "] - " << result.Vamp[mu] << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user