CUDA 中 单精度浮点操作和 双精度浮点操作

在CUDA 中如果不指明是 单精度, CUDA会调用双精度实现。    (血泪呀!!!)

如果要使用单精度,要指明, 即使用 形如__fmul_rn(x,y)的函数。

详见链接!!

http://stackoverflow.com/questions/14406364/different-results-for-cuda-addition-on-host-and-on-gpu?rq=1

高山仰止,景行行止。虽不能至,然心向往之。
原文地址:https://www.cnblogs.com/xingzifei/p/4899435.html