File tree 1 file changed +0
-35
lines changed
libclc/ptx-nvidiacl/libspirv/math 1 file changed +0
-35
lines changed Original file line number Diff line number Diff line change 14
14
#define __CLC_FUNCTION __spirv_ocl_native_exp2
15
15
#define __CLC_BUILTIN __nv_exp2
16
16
#define __CLC_BUILTIN_F __CLC_XCONCAT(__CLC_BUILTIN, f)
17
-
18
- #ifdef cl_khr_fp16
19
- #pragma OPENCL EXTENSION cl_khr_fp16 : enable
20
-
21
- int __clc_nvvm_reflect_arch ();
22
-
23
- _CLC_DEF _CLC_OVERLOAD half __spirv_ocl_native_exp2 (half x ) {
24
- if (__clc_nvvm_reflect_arch () >= 750 ) {
25
- return __nvvm_ex2_approx_f16 (x );
26
- }
27
- float upcast = x ;
28
- return __spirv_ocl_native_exp2 (upcast );
29
- }
30
-
31
- _CLC_DEF _CLC_OVERLOAD half2 __spirv_ocl_native_exp2 (half2 x ) {
32
- if (__clc_nvvm_reflect_arch () >= 750 ) {
33
- return __nvvm_ex2_approx_f16x2 (x );
34
- }
35
- float upcast0 = x [0 ];
36
- float upcast1 = x [1 ];
37
- half2 res ;
38
- res .s0 = __spirv_ocl_native_exp2 (upcast0 );
39
- res .s1 = __spirv_ocl_native_exp2 (upcast1 );
40
- return res ;
41
- }
42
-
43
- _CLC_UNARY_VECTORIZE_HAVE2 (_CLC_OVERLOAD _CLC_DEF , half ,
44
- __spirv_ocl_native_exp2 , half )
45
-
46
- #endif // cl_khr_fp16
47
-
48
- // Undef halfs before uncluding unary builtins, as they are handled above.
49
- #ifdef cl_khr_fp16
50
- #undef cl_khr_fp16
51
- #endif // cl_khr_fp16
52
17
#include <math/unary_builtin.inc>
You can’t perform that action at this time.
0 commit comments