Issues with std::pow in Nebo for GPU
Dav de St. Germain (firstname.lastname@example.org) reported this issue when building Wasatch.
It appears that in
include/spatialops/NeboOperators.h there are 4 (ish) locations where
pow() is used with an integer as the 2nd argument.
I believe that NVCC will replace the
std::pow(double, double) with its own version (device version), but it will not do the same with
pow( double, int ).
The work-around I am currently using is to cast the 2nd argument of the
pow() calls in
doubles. I believe that this makes the pow call "much slower" (then raising to an integer power). What I don't know is how this issues should be fixed (or who is the CUDA expert that could do so), or where to fix it. Also, it is possible that the
pow() is not called very often which means that fixing may not even really be necessary.
The wasatch3p build script currently hacks
NeboOperators.hto get it compiling with CUDA on newer architectures (e.g., Titan). We should remove that once this issue is completed.