File tree Expand file tree Collapse file tree 8 files changed +20
-10
lines changed
libclc/libspirv/lib/generic Expand file tree Collapse file tree 8 files changed +20
-10
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ atomic/atomic_xor.cl
21
21
atomic/atomic_load.cl
22
22
atomic/atomic_store.cl
23
23
common/degrees.cl
24
+ common/fclamp.cl
24
25
common/mix.cl
25
26
common/radians.cl
26
27
common/sign.cl
@@ -38,12 +39,15 @@ geometric/scale.cl
38
39
integer/abs.cl
39
40
integer/abs_diff.cl
40
41
integer/add_sat.cl
42
+ integer/clamp.cl
41
43
integer/clz.cl
42
44
integer/ctz.cl
43
45
integer/hadd.cl
44
46
integer/mad24.cl
45
47
integer/mad_hi.cl
46
48
integer/mad_sat.cl
49
+ integer/max.cl
50
+ integer/min.cl
47
51
integer/mul24.cl
48
52
integer/mul_hi.cl
49
53
integer/popcount.cl
@@ -170,9 +174,6 @@ relational/isordered.cl
170
174
relational/isunordered.cl
171
175
relational/select.cl
172
176
relational/signbit.cl
173
- shared/clamp.cl
174
- shared/max.cl
175
- shared/min.cl
176
177
shared/vload.cl
177
178
shared/vstore.cl
178
179
workitem/get_global_id.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/shared/clc_clamp.h>
10
+ #include <libspirv/spirv.h>
11
+
12
+ #define FUNCTION __spirv_ocl_fclamp
13
+ #define __CLC_FUNCTION (x ) __clc_clamp
14
+
15
+ #define __CLC_BODY <clc/shared/ternary_def.inc>
16
+ #include <clc/math/gentype.inc>
Original file line number Diff line number Diff line change 11
11
12
12
#define __CLC_BODY <clamp.inc>
13
13
#include <clc/integer/gentype.inc>
14
-
15
- #define __CLC_BODY <clamp.inc>
16
- #include <clc/math/gentype.inc>
Original file line number Diff line number Diff line change 6
6
//
7
7
// ===----------------------------------------------------------------------===//
8
8
9
- #ifdef __CLC_FPSIZE
10
- #define DECL __spirv_ocl_fclamp
11
- #else
12
9
#ifdef __CLC_GEN_S
13
10
#define DECL __spirv_ocl_s_clamp
14
11
#else
15
12
#define DECL __spirv_ocl_u_clamp
16
13
#endif
17
- #endif
18
14
19
15
_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE DECL (__CLC_GENTYPE x, __CLC_GENTYPE y,
20
16
__CLC_GENTYPE z) {
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments