File tree Expand file tree Collapse file tree 7 files changed +180
-0
lines changed Expand file tree Collapse file tree 7 files changed +180
-0
lines changed Original file line number Diff line number Diff line change 80
80
#define __CLC_U_GENTYPE __CLC_XCONCAT (uint, __CLC_VECSIZE)
81
81
82
82
#define __CLC_GENTYPE float
83
+ #define __CLC_BIT_INT int
83
84
#define __CLC_BIT_INTN int
84
85
#define __CLC_SCALAR
85
86
#define __CLC_VECSIZE
131
132
#include __CLC_BODY
132
133
#undef __CLC_VECSIZE
133
134
#undef __CLC_GENTYPE
135
+ #undef __CLC_BIT_INT
134
136
#undef __CLC_BIT_INTN
135
137
136
138
#undef __CLC_VECSIZE_OR_1
159
161
#define __CLC_VECSIZE
160
162
#define __CLC_VECSIZE_OR_1 1
161
163
#define __CLC_GENTYPE double
164
+ #define __CLC_BIT_INT long
162
165
#define __CLC_BIT_INTN long
163
166
#include __CLC_BODY
164
167
#undef __CLC_VECSIZE_OR_1
207
210
#include __CLC_BODY
208
211
#undef __CLC_VECSIZE
209
212
#undef __CLC_GENTYPE
213
+ #undef __CLC_BIT_INT
210
214
#undef __CLC_BIT_INTN
211
215
212
216
#undef __CLC_VECSIZE_OR_1
235
239
#define __CLC_VECSIZE
236
240
#define __CLC_VECSIZE_OR_1 1
237
241
#define __CLC_GENTYPE half
242
+ #define __CLC_BIT_INT short
238
243
#define __CLC_BIT_INTN short
239
244
#include __CLC_BODY
240
245
#undef __CLC_GENTYPE
283
288
#include __CLC_BODY
284
289
#undef __CLC_VECSIZE
285
290
#undef __CLC_GENTYPE
291
+ #undef __CLC_BIT_INT
286
292
#undef __CLC_BIT_INTN
287
293
288
294
#undef __CLC_VECSIZE_OR_1
Original file line number Diff line number Diff line change
1
+ math/clc_log.cl
2
+ math/clc_rsqrt.cl
3
+ math/clc_sinpi.cl
4
+ math/clc_sqrt.cl
1
5
mem_fence/clc_mem_fence.cl
2
6
synchronization/clc_work_group_barrier.cl
3
7
workitem/clc_get_global_id.cl
@@ -7,3 +11,4 @@ workitem/clc_get_local_size.cl
7
11
workitem/clc_get_max_sub_group_size.cl
8
12
workitem/clc_get_num_groups.cl
9
13
workitem/clc_get_sub_group_local_id.cl
14
+ relational/clc_isinf.cl
Original file line number Diff line number Diff line change
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ //
7
+ //===----------------------------------------------------------------------===//
8
+
9
+ #include <clc/math/clc_log.h>
10
+
11
+ float __nv_logf (float );
12
+ double __nv_log (double );
13
+
14
+ _CLC_OVERLOAD _CLC_DEF float __clc_log (float x ) { return __nv_logf (x ); }
15
+
16
+ #ifdef cl_khr_fp64
17
+ #pragma OPENCL EXTENSION cl_khr_fp64 : enable
18
+
19
+ _CLC_OVERLOAD _CLC_DEF double __clc_log (double x ) { return __nv_log (x ); }
20
+
21
+ #endif
22
+
23
+ #ifdef cl_khr_fp16
24
+ #pragma OPENCL EXTENSION cl_khr_fp16 : enable
25
+
26
+ _CLC_OVERLOAD _CLC_DEF half __clc_log (half x ) {
27
+ return (half )__clc_log ((float )x );
28
+ }
29
+
30
+ #endif
31
+
32
+ #define FUNCTION __clc_log
33
+ #define __CLC_BODY <clc/shared/unary_def_scalarize.inc>
34
+ #include <clc/math/gentype.inc>
Original file line number Diff line number Diff line change
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ //
7
+ //===----------------------------------------------------------------------===//
8
+
9
+ #include <clc/math/clc_rsqrt.h>
10
+
11
+ float __nv_rsqrtf (float );
12
+ double __nv_rsqrt (double );
13
+
14
+ _CLC_OVERLOAD _CLC_DEF float __clc_rsqrt (float x ) { return __nv_rsqrtf (x ); }
15
+
16
+ #ifdef cl_khr_fp64
17
+ #pragma OPENCL EXTENSION cl_khr_fp64 : enable
18
+
19
+ _CLC_OVERLOAD _CLC_DEF double __clc_rsqrt (double x ) { return __nv_rsqrt (x ); }
20
+
21
+ #endif
22
+
23
+ #ifdef cl_khr_fp16
24
+ #pragma OPENCL EXTENSION cl_khr_fp16 : enable
25
+
26
+ _CLC_OVERLOAD _CLC_DEF half __clc_rsqrt (half x ) {
27
+ return (half )__clc_rsqrt ((float )x );
28
+ }
29
+
30
+ #endif
31
+
32
+ #define FUNCTION __clc_rsqrt
33
+ #define __CLC_BODY <clc/shared/unary_def_scalarize.inc>
34
+ #include <clc/math/gentype.inc>
Original file line number Diff line number Diff line change
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ //
7
+ //===----------------------------------------------------------------------===//
8
+
9
+ #include <clc/math/clc_sinpi.h>
10
+
11
+ float __nv_sinpif (float );
12
+ double __nv_sinpi (double );
13
+
14
+ _CLC_OVERLOAD _CLC_DEF float __clc_sinpi (float x ) { return __nv_sinpif (x ); }
15
+
16
+ #ifdef cl_khr_fp64
17
+ #pragma OPENCL EXTENSION cl_khr_fp64 : enable
18
+
19
+ _CLC_OVERLOAD _CLC_DEF double __clc_sinpi (double x ) { return __nv_sinpi (x ); }
20
+
21
+ #endif
22
+
23
+ #ifdef cl_khr_fp16
24
+ #pragma OPENCL EXTENSION cl_khr_fp16 : enable
25
+
26
+ _CLC_OVERLOAD _CLC_DEF half __clc_sinpi (half x ) {
27
+ return (half )__clc_sinpi ((float )x );
28
+ }
29
+
30
+ #endif
31
+
32
+ #define FUNCTION __clc_sinpi
33
+ #define __CLC_BODY <clc/shared/unary_def_scalarize.inc>
34
+ #include <clc/math/gentype.inc>
Original file line number Diff line number Diff line change
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ //
7
+ //===----------------------------------------------------------------------===//
8
+
9
+ #include <clc/math/clc_sqrt.h>
10
+
11
+ float __nv_sqrtf (float );
12
+ double __nv_sqrt (double );
13
+
14
+ _CLC_OVERLOAD _CLC_DEF float __clc_sqrt (float x ) { return __nv_sqrtf (x ); }
15
+
16
+ #ifdef cl_khr_fp64
17
+ #pragma OPENCL EXTENSION cl_khr_fp64 : enable
18
+
19
+ _CLC_OVERLOAD _CLC_DEF double __clc_sqrt (double x ) { return __nv_sqrt (x ); }
20
+
21
+ #endif
22
+
23
+ #ifdef cl_khr_fp16
24
+ #pragma OPENCL EXTENSION cl_khr_fp16 : enable
25
+
26
+ _CLC_OVERLOAD _CLC_DEF half __clc_sqrt (half x ) {
27
+ return (half )__clc_sqrt ((float )x );
28
+ }
29
+
30
+ #endif
31
+
32
+ #define FUNCTION __clc_sqrt
33
+ #define __CLC_BODY <clc/shared/unary_def_scalarize.inc>
34
+ #include <clc/math/gentype.inc>
Original file line number Diff line number Diff line change
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ //
7
+ //===----------------------------------------------------------------------===//
8
+
9
+ #include <clc/relational/clc_isinf.h>
10
+
11
+ int __nv_isinff (float );
12
+ int __nv_isinfd (double );
13
+
14
+ _CLC_OVERLOAD _CLC_DEF int __clc_isinf (float x ) { return __nv_isinff (x ); }
15
+
16
+ #ifdef cl_khr_fp64
17
+ #pragma OPENCL EXTENSION cl_khr_fp64 : enable
18
+
19
+ _CLC_OVERLOAD _CLC_DEF int __clc_isinf (double x ) { return __nv_isinfd (x ); }
20
+
21
+ #endif
22
+
23
+ #ifdef cl_khr_fp16
24
+ #pragma OPENCL EXTENSION cl_khr_fp16 : enable
25
+
26
+ _CLC_OVERLOAD _CLC_DEF int __clc_isinf (half x ) { return __clc_isinf ((float )x ); }
27
+
28
+ #endif
29
+
30
+ #define FUNCTION __clc_isinf
31
+ #define __CLC_BODY <clc/shared/unary_def_scalarize.inc>
32
+ #define __CLC_RET_TYPE __CLC_BIT_INT
33
+ #include <clc/math/gentype.inc>
You can’t perform that action at this time.
0 commit comments