Find logarithm in cuda
How do I开发者_运维百科 find logarithm in cuda? I'm looking for a device function.
Thanks
You can use:
logf(x)
__logf(x)
log2f(x)
__log2f(x)
log10f(x)
__log10f(x)
Taken from the CUDA Programming Guide (Appendix D).
As Ade says log* functions. Keep in mind that __log* might be fast but not accurate.
精彩评论