How are represented trigonometrics function in CUDA C++ ?
CUDA provides a set of basic trig functions that are similar to what is available in host code from math.h
Thank You for Your answer .
how is realized access to trigonometrc functions ?
e.g. fsin is realized by x87 by two method , how is method in CUDA ?
“e.g. fsin is realized by x87 by two method”
which 2 methods are you referring to?
from the ptx isa document it is quite easy to deduce which mathematical statements would be executed by device instructions, and which by functions (that in turn reference device instructions)
and, as far as i know, if there is no device instruction for a particular mathematical statement, as txbob pointed out, chances are that the function provided to implement it, closely follows the general c math library implementation
If you want to see how CUDA math function are implemented, take a look at the header files math_functions.h and math_functions_dbl_ptx3.h that are part of your CUDA installation.