Find logarithm in cuda

我只是一个虾纸丫 提交于 2019-12-03 21:38:20

问题


How do I find logarithm in cuda? I'm looking for a device function.

Thanks


回答1:


You can use:

logf(x)
__logf(x)
log2f(x)
__log2f(x)
log10f(x)
__log10f(x)

Taken from the CUDA Programming Guide (Appendix D).




回答2:


As Ade says log* functions. Keep in mind that __log* might be fast but not accurate.



来源:https://stackoverflow.com/questions/5355557/find-logarithm-in-cuda

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!