1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-10 07:55:35 +00: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 ret = ret_i.View();
ret.Checkerboard() = rhs.Checkerboard();
accelerator_for(ss,rhs.size(),obj::Nsimd(),{
coalescedWrite(ret[ss],pow(rhs(ss),y));
accelerator_for(ss,rhs.size(),1,{
ret[ss]=pow(rhs[ss],y);
});
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(mod,Integer);
BINARY_RSCALAR(pow,RealD);
BINARY_RSCALAR(pow,RealF);
#undef UNARY
#undef BINARY_RSCALAR