I'm trying to use a special function provided by boost.math in a thrust algorithm.
Basically, I want to do a transformation, like so
thrust::device_vector<double> in(1000);
thrust::device_vector<double> out(1000);
thrust::transform(in.begin(), in.end(), out.begin(), myfunctor());
where myfunctor()
is given by
#include <boost/math/special_functions/ellint_1.hpp>
.
.
.
struct myfunctor {
__host__ __device__
double operator()(double k) {
return boost::math::ellint_1(sqrt(k));
}
};
I keep getting warning: calling a __host__ function from a __host__ __device__ function is not allowed
right at the line where ellint_1
is called in the functor.
Am I doing something wrong or is boost.math not suited for GPGPU use (because from what I've read, i definitely thought it was)?