CUDA exp()expf()和__expf() [英] CUDA exp() expf() and __expf()

查看:1317
本文介绍了CUDA exp()expf()和__expf()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何优化cuda中的exp函数?
CUDA中的以下内容之间的区别

How to optimize the exp function in cuda? What are the differences between the following in CUDA??

   exp()
   expf()
   __expf()


推荐答案

CUDA C编程指南 ,附录D.


  • exp()应该被重载为单个

  • expf()应用于单精度( float

  • __ expf()是快速数学版本,性能更快,输入值,请参阅指南 a>了解更多详情)。

  • exp() should be used for double precision, although should be overloaded for single
  • expf() should be used for single precision (float)
  • __expf() is the fast-math version, the performance is faster with some loss of precision (dependent on the input value, see the guide for more details).

这篇关于CUDA exp()expf()和__expf()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆