Skip to content

Commit f0a4fe2

Browse files
Naghasandavidtwco
andauthored
[SYCL-PTX] Add integer and shared builtins categories (#1828)
This patch adds all builtins from the integer and shared builtins categories. Remove old forward declared SPIR-V builtin from the integer and shared categories. Update the binding file using the header generator. Add relevant binding test. Remove XFAIL from related SYCL tests. Signed-off-by: Victor Lomuller <[email protected]> Co-authored-by: David Wood <[email protected]>
1 parent 1f76efc commit f0a4fe2

File tree

128 files changed

+12708
-223
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+12708
-223
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,51 @@
1-
#ifndef __CLC_BODY_U
2-
#define __CLC_BODY_U __CLC_BODY
3-
#endif
4-
#ifndef __CLC_BODY_S
5-
#define __CLC_BODY_S __CLC_BODY
6-
#endif
1+
#define __CLC_GEN_S
72

83
#define __CLC_GENTYPE int
9-
#include __CLC_BODY_S
4+
#include __CLC_BODY
105
#undef __CLC_GENTYPE
116

127
#define __CLC_GENTYPE int2
13-
#include __CLC_BODY_S
8+
#include __CLC_BODY
149
#undef __CLC_GENTYPE
1510

1611
#define __CLC_GENTYPE int3
17-
#include __CLC_BODY_S
12+
#include __CLC_BODY
1813
#undef __CLC_GENTYPE
1914

2015
#define __CLC_GENTYPE int4
21-
#include __CLC_BODY_S
16+
#include __CLC_BODY
2217
#undef __CLC_GENTYPE
2318

2419
#define __CLC_GENTYPE int8
25-
#include __CLC_BODY_S
20+
#include __CLC_BODY
2621
#undef __CLC_GENTYPE
2722

2823
#define __CLC_GENTYPE int16
29-
#include __CLC_BODY_S
24+
#include __CLC_BODY
3025
#undef __CLC_GENTYPE
3126

27+
#undef __CLC_GEN_S
28+
3229
#define __CLC_GENTYPE uint
33-
#include __CLC_BODY_U
30+
#include __CLC_BODY
3431
#undef __CLC_GENTYPE
3532

3633
#define __CLC_GENTYPE uint2
37-
#include __CLC_BODY_U
34+
#include __CLC_BODY
3835
#undef __CLC_GENTYPE
3936

4037
#define __CLC_GENTYPE uint3
41-
#include __CLC_BODY_U
38+
#include __CLC_BODY
4239
#undef __CLC_GENTYPE
4340

4441
#define __CLC_GENTYPE uint4
45-
#include __CLC_BODY_U
42+
#include __CLC_BODY
4643
#undef __CLC_GENTYPE
4744

4845
#define __CLC_GENTYPE uint8
49-
#include __CLC_BODY_U
46+
#include __CLC_BODY
5047
#undef __CLC_GENTYPE
5148

5249
#define __CLC_GENTYPE uint16
53-
#include __CLC_BODY_U
50+
#include __CLC_BODY
5451
#undef __CLC_GENTYPE
55-
56-
#undef __CLC_BODY_U
57-
#undef __CLC_BODY_S

libclc/generic/include/spirv/integer/definitions.h

-23
This file was deleted.

libclc/generic/include/spirv/integer/rotate.inc

-9
This file was deleted.

libclc/generic/include/spirv/shared/vload.h

-67
This file was deleted.

libclc/generic/include/spirv/shared/vstore.h

-70
This file was deleted.

libclc/generic/include/spirv/spirv.h

+1-10
Original file line numberDiff line numberDiff line change
@@ -146,22 +146,13 @@
146146
/* 6.11.2.1 Floating-point macros */
147147
#include <clc/float/definitions.h>
148148

149-
/* 6.11.3 Integer Functions */
150-
#include <spirv/integer/clz.h>
151-
#include <spirv/integer/popcount.h>
152-
#include <spirv/integer/rotate.h>
153-
154149
/* 6.11.3 Integer Definitions */
155150
#include <clc/integer/definitions.h>
156151

157-
/* 6.11.2 and 6.11.3 Shared Integer/Math Functions */
158-
#include <spirv/shared/vload.h>
159-
#include <spirv/shared/vstore.h>
160-
161152
/* 6.11.4 Common Functions */
162153
#include <spirv/common/degrees.h>
163-
#include <spirv/common/radians.h>
164154
#include <spirv/common/mix.h>
155+
#include <spirv/common/radians.h>
165156
#include <spirv/common/sign.h>
166157
#include <spirv/common/smoothstep.h>
167158
#include <spirv/common/step.h>

0 commit comments

Comments
 (0)