Sqrt and Pow on CUDA

Hi, I need these two functions on a device function but when I call one of these it shows me this message:
error: calling a host function from a device/global function is not allowed

I know I can’t host’s functions from a device’s function, but how can I do the sqrt and the pow on a device’s function?

Thanks for the answers!

Use powf(x,y) and sqrtf(x), it works in my device funktions without errors.
You can optionally use -use_fast_math compiler option for more performance.

1 Like

Thanks :)
It works fine ;)