mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
Force a couple of things to compile on NVCC
This commit is contained in:
parent
be37dfb6f8
commit
4278caa030
@ -116,23 +116,6 @@ std::vector<std::string> TFourQuark<FImpl1, FImpl2>::getOutput(void)
|
|||||||
template <typename FImpl1, typename FImpl2>
|
template <typename FImpl1, typename FImpl2>
|
||||||
void TFourQuark<FImpl1, FImpl2>::tensorprod(LatticeSpinColourSpinColourMatrix &lret, LatticeSpinColourMatrix a, LatticeSpinColourMatrix b)
|
void TFourQuark<FImpl1, FImpl2>::tensorprod(LatticeSpinColourSpinColourMatrix &lret, LatticeSpinColourMatrix a, LatticeSpinColourMatrix b)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
parallel_for(auto site=lret.begin();site<lret.end();site++) {
|
|
||||||
for (int si; si < 4; ++si){
|
|
||||||
for(int sj; sj <4; ++sj){
|
|
||||||
for (int ci; ci < 3; ++ci){
|
|
||||||
for (int cj; cj < 3; ++cj){
|
|
||||||
for (int sk; sk < 4; ++sk){
|
|
||||||
for(int sl; sl <4; ++sl){
|
|
||||||
for (int ck; ck < 3; ++ck){
|
|
||||||
for (int cl; cl < 3; ++cl){
|
|
||||||
lret[site]()(si,sj)(ci,cj)(sk,sl)(ck,cl)=a[site]()(si,sj)(ci,cj)*b[site]()(sk,sl)(ck,cl);
|
|
||||||
}}
|
|
||||||
}}
|
|
||||||
}}
|
|
||||||
}}
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
// FIXME ; is there a general need for this construct ? In which case we should encapsulate the
|
// FIXME ; is there a general need for this construct ? In which case we should encapsulate the
|
||||||
// below loops in a helper function.
|
// below loops in a helper function.
|
||||||
//LOG(Message) << "sp co mat a is - " << a << std::endl;
|
//LOG(Message) << "sp co mat a is - " << a << std::endl;
|
||||||
@ -140,6 +123,9 @@ void TFourQuark<FImpl1, FImpl2>::tensorprod(LatticeSpinColourSpinColourMatrix &l
|
|||||||
auto lret_v = lret.View();
|
auto lret_v = lret.View();
|
||||||
auto a_v = a.View();
|
auto a_v = a.View();
|
||||||
auto b_v = b.View();
|
auto b_v = b.View();
|
||||||
|
#ifdef GRID_NVCC
|
||||||
|
#warning "NVCC problem: Removed impossibly slow compile of simple NPR host code in FourQuark.hpp"
|
||||||
|
#else
|
||||||
thread_foreach( site,lret_v,{
|
thread_foreach( site,lret_v,{
|
||||||
vTComplex left;
|
vTComplex left;
|
||||||
for(int si=0; si < Ns; ++si){
|
for(int si=0; si < Ns; ++si){
|
||||||
@ -153,7 +139,7 @@ void TFourQuark<FImpl1, FImpl2>::tensorprod(LatticeSpinColourSpinColourMatrix &l
|
|||||||
}}
|
}}
|
||||||
}}
|
}}
|
||||||
});
|
});
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -171,6 +157,7 @@ void TFourQuark<FImpl1, FImpl2>::setup(void)
|
|||||||
template <typename FImpl1, typename FImpl2>
|
template <typename FImpl1, typename FImpl2>
|
||||||
void TFourQuark<FImpl1, FImpl2>::execute(void)
|
void TFourQuark<FImpl1, FImpl2>::execute(void)
|
||||||
{
|
{
|
||||||
|
#ifndef GRID_NVCC
|
||||||
|
|
||||||
/*********************************************************************************
|
/*********************************************************************************
|
||||||
|
|
||||||
@ -234,7 +221,6 @@ We have up to 256 of these including the offdiag (G1 != G2).
|
|||||||
Sin = Sin*exp(-Ci*pdotxin); //phase corrections
|
Sin = Sin*exp(-Ci*pdotxin); //phase corrections
|
||||||
Sout = Sout*exp(-Ci*pdotxout);
|
Sout = Sout*exp(-Ci*pdotxout);
|
||||||
|
|
||||||
|
|
||||||
//Set up Gammas
|
//Set up Gammas
|
||||||
std::vector<Gamma> gammavector;
|
std::vector<Gamma> gammavector;
|
||||||
for( int i=1; i<Gamma::nGamma; i+=2){
|
for( int i=1; i<Gamma::nGamma; i+=2){
|
||||||
@ -268,6 +254,7 @@ We have up to 256 of these including the offdiag (G1 != G2).
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
write(writer, "fourquark", result.fourquark);
|
write(writer, "fourquark", result.fourquark);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
END_MODULE_NAMESPACE
|
END_MODULE_NAMESPACE
|
||||||
|
@ -35,8 +35,9 @@ directory
|
|||||||
|
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
|
#ifndef GRID_NVCC
|
||||||
using namespace Grid;
|
using namespace Grid;
|
||||||
;
|
|
||||||
|
|
||||||
// Here change the allowed (higher) representations
|
// Here change the allowed (higher) representations
|
||||||
typedef Representations< FundamentalRepresentation, AdjointRepresentation , TwoIndexSymmetricRepresentation> TheRepresentations;
|
typedef Representations< FundamentalRepresentation, AdjointRepresentation , TwoIndexSymmetricRepresentation> TheRepresentations;
|
||||||
@ -133,7 +134,7 @@ int main(int argc, char **argv) {
|
|||||||
TheHMC.Run(); // no smearing
|
TheHMC.Run(); // no smearing
|
||||||
|
|
||||||
Grid_finalize();
|
Grid_finalize();
|
||||||
|
#endif
|
||||||
} // main
|
} // main
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user