Zhang
Zhang

Reputation: 79

math function in cuda

When I use cuda Mathematical Functions(like fmax(double, double), exp(double))in a kernel function, how can I make sure that the compiler doesn't confuse the c/c++ built-in function with the same name?(fmax(), exp() also exist in c++ API)

Upvotes: 1

Views: 1843

Answers (1)

talonmies
talonmies

Reputation: 72348

nvcc and the CUDA toolchain automatically manage this for you.

There is nothing required to ensure that this works correctly except reading the CUDA math API documentation and using a supported host compiler version with nvcc on your platform of choice.

Upvotes: 3

Related Questions