We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b022979 commit fa37970Copy full SHA for fa37970
libclc/clc/lib/generic/math/clc_rsqrt.cl
@@ -21,7 +21,6 @@
21
*/
22
23
#include <clc/internal/clc.h>
24
-#include <clc/math/clc_sqrt.h>
25
26
#define __CLC_BODY <clc_rsqrt.inc>
27
#include <clc/math/gentype.inc>
libclc/clc/lib/generic/math/clc_rsqrt.inc
@@ -1,4 +1,5 @@
1
__attribute__((weak)) _CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE
2
__clc_rsqrt(__CLC_GENTYPE val) {
3
- return __CLC_FP_LIT(1.0) / __clc_sqrt(val);
+#pragma clang fp contract(fast)
4
+ return __CLC_FP_LIT(1.0) / __builtin_elementwise_sqrt(val);
5
}
0 commit comments