1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-09 21:50:45 +01:00

Pow is being awkward in thrust for reasons I don't understand. Possible thrust bug.

This commit is contained in:
Peter Boyle 2019-06-16 12:05:11 +01:00
parent d7b3efe893
commit d976e5c514
2 changed files with 3 additions and 2 deletions

View File

@ -38,8 +38,8 @@ template<class obj> Lattice<obj> pow(const Lattice<obj> &rhs_i,RealD y){
auto rhs = rhs_i.View(); auto rhs = rhs_i.View();
auto ret = ret_i.View(); auto ret = ret_i.View();
ret.Checkerboard() = rhs.Checkerboard(); ret.Checkerboard() = rhs.Checkerboard();
accelerator_for(ss,rhs.size(),obj::Nsimd(),{ accelerator_for(ss,rhs.size(),1,{
coalescedWrite(ret[ss],pow(rhs(ss),y)); ret[ss]=pow(rhs[ss],y);
}); });
return ret_i; return ret_i;
} }

View File

@ -146,6 +146,7 @@ template<class obj,int N> accelerator_inline auto toComplex(const iMatrix<obj,N>
BINARY_RSCALAR(div,Integer); BINARY_RSCALAR(div,Integer);
BINARY_RSCALAR(mod,Integer); BINARY_RSCALAR(mod,Integer);
BINARY_RSCALAR(pow,RealD); BINARY_RSCALAR(pow,RealD);
BINARY_RSCALAR(pow,RealF);
#undef UNARY #undef UNARY
#undef BINARY_RSCALAR #undef BINARY_RSCALAR