Hi, I am pretty new on CUDA programming. I heard that CUDA offers hardware mathematic functions which run fast. I tried to add the following line in my code
float x = __cos(y)
where y is an automatic variable of float type.
But when I compiled the code, the error message said identifier “__cos” is undefined. I wonder if I need to include any header file or change some settings in the properties.
BTW, I use Microsoft Visual Studio to compile the code. If I turn “Use fast math” property to “Yes”, are the math functions in the program automatically converted to hardward functions? For example, is cos(y) converted to __cos(y)?
Please help me. Thanks a lot in advance.