gpt4 book ai didi

cuda - 在 OpenCL 中是否有与 native_recip() 等效的 CUDA?

转载 作者:行者123 更新时间:2023-12-04 09:21:17 28 4
gpt4 key购买 nike

OpenCL 有一个名为 native_recip 的内置函数:

gentype native_recip(gentype x);

native_recip computes reciprocal over an implementation-defined range. The maximum error is implementation-defined.

The vector versions of the math functions operate component-wise. The description is per-component.

The built-in math functions are not affected by the prevailing rounding mode in the calling environment, and always return the same value as they would if called with the round to nearest even rounding mode.


CUDA 中是否有与此功能等效的功能?

最佳答案

如评论中所述,它是 __frcp_rn() float的和 __drcp_rn() double的;以及向量类型的实现(例如 float4 ),以便按元素应用 frcp/drcp。
注意:“rcp”是“reciprocal”的缩写,“rn”是舍入模式"round to nearest even" .

关于cuda - 在 OpenCL 中是否有与 native_recip() 等效的 CUDA?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63101094/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com