I am trying to use a math function (pow) in a __global__ function but I get this error :
calling a __host__ function(\"std::pow \") fro
You need to read the error message more carefully. The key piece of information is
std::pow<float, double>
Note: <float,double>
. You have a call to pow
with a double precision and a single precision argument. The CUDA math library is implemented by template overloading of selected standard library functions, but the arguments you have don't have a matching overload. Fix you code to have either all double precision or all single precision arguments, and the error will disappear.