Skip to content

Commit 148b1ce

Browse files
committed
undo spir-v stuff
1 parent 159971d commit 148b1ce

File tree

11 files changed

+27
-56
lines changed

11 files changed

+27
-56
lines changed
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
#ifndef __CLC_INTEGER_CLC_CLZ_H__
22
#define __CLC_INTEGER_CLC_CLZ_H__
33

4-
#if defined(CLC_CLSPV) || defined(CLC_SPIRV)
5-
// clspv and spir-v targets provide their own OpenCL-compatible clz
6-
#define __clc_clz clz
7-
#else
8-
94
#include <clc/clcfunc.h>
105
#include <clc/clctypes.h>
116

@@ -14,8 +9,7 @@
149

1510
#include <clc/integer/gentype.inc>
1611

12+
#undef __CLC_BODY
1713
#undef FUNCTION
1814

19-
#endif
20-
2115
#endif // __CLC_INTEGER_CLC_CLZ_H__
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
#ifndef __CLC_INTEGER_CLC_HADD_H__
22
#define __CLC_INTEGER_CLC_HADD_H__
33

4-
#if defined(CLC_CLSPV) || defined(CLC_SPIRV)
5-
// clspv and spir-v targets provide their own OpenCL-compatible hadd
6-
#define __clc_hadd hadd
7-
#else
8-
94
#include <clc/clcfunc.h>
105
#include <clc/clctypes.h>
116

@@ -14,8 +9,7 @@
149

1510
#include <clc/integer/gentype.inc>
1611

12+
#undef __CLC_BODY
1713
#undef FUNCTION
1814

19-
#endif
20-
2115
#endif // __CLC_INTEGER_CLC_HADD_H__
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
#ifndef __CLC_INTEGER_CLC_MAD24_H__
22
#define __CLC_INTEGER_CLC_MAD24_H__
33

4-
#if defined(CLC_CLSPV) || defined(CLC_SPIRV)
5-
// clspv and spir-v targets provide their own OpenCL-compatible mad24
6-
#define __clc_mad24 mad24
7-
#else
8-
94
#include <clc/clcfunc.h>
105
#include <clc/clctypes.h>
116

@@ -14,8 +9,7 @@
149

1510
#include <clc/integer/gentype24.inc>
1611

12+
#undef __CLC_BODY
1713
#undef FUNCTION
1814

19-
#endif
20-
2115
#endif // __CLC_INTEGER_CLC_MAD24_H__
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
#ifndef __CLC_INTEGER_CLC_MUL24_H__
22
#define __CLC_INTEGER_CLC_MUL24_H__
33

4-
#if defined(CLC_CLSPV) || defined(CLC_SPIRV)
5-
// clspv and spir-v targets provide their own OpenCL-compatible mul24
6-
#define __clc_mul24 mul24
7-
#else
8-
94
#include <clc/clcfunc.h>
105
#include <clc/clctypes.h>
116

@@ -14,8 +9,7 @@
149

1510
#include <clc/integer/gentype24.inc>
1611

12+
#undef __CLC_BODY
1713
#undef FUNCTION
1814

19-
#endif
20-
2115
#endif // __CLC_INTEGER_CLC_MUL24_H__
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
#ifndef __CLC_INTEGER_CLC_MUL_HI_H__
22
#define __CLC_INTEGER_CLC_MUL_HI_H__
33

4-
#if defined(CLC_CLSPV) || defined(CLC_SPIRV)
5-
// clspv and spir-v targets provide their own OpenCL-compatible mul_hi
6-
#define __clc_mul_hi mul_hi
7-
#else
8-
94
#include <clc/clcfunc.h>
105
#include <clc/clctypes.h>
116

@@ -14,8 +9,7 @@
149

1510
#include <clc/integer/gentype.inc>
1611

12+
#undef __CLC_BODY
1713
#undef FUNCTION
1814

19-
#endif
20-
2115
#endif // __CLC_INTEGER_CLC_MUL_HI_H__
Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
#ifndef __CLC_INTEGER_CLC_POPCOUNT_H__
22
#define __CLC_INTEGER_CLC_POPCOUNT_H__
33

4-
#if defined(CLC_CLSPV) || defined(CLC_SPIRV)
5-
// clspv and spir-v targets provide their own OpenCL-compatible popcount
6-
#define __clc_popcount popcount
7-
#else
8-
94
// Map the function to an LLVM intrinsic
105
#define __CLC_FUNCTION __clc_popcount
116
#define __CLC_INTRINSIC "llvm.ctpop"
@@ -14,6 +9,4 @@
149
#undef __CLC_INTRINSIC
1510
#undef __CLC_FUNCTION
1611

17-
#endif
18-
1912
#endif // __CLC_INTEGER_CLC_POPCOUNT_H__
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
#ifndef __CLC_INTEGER_CLC_RHADD_H__
22
#define __CLC_INTEGER_CLC_RHADD_H__
33

4-
#if defined(CLC_CLSPV) || defined(CLC_SPIRV)
5-
// clspv and spir-v targets provide their own OpenCL-compatible rhadd
6-
#define __clc_rhadd rhadd
7-
#else
8-
94
#include <clc/clcfunc.h>
105
#include <clc/clctypes.h>
116

@@ -14,8 +9,7 @@
149

1510
#include <clc/integer/gentype.inc>
1611

12+
#undef __CLC_BODY
1713
#undef FUNCTION
1814

19-
#endif
20-
2115
#endif // __CLC_INTEGER_CLC_RHADD_H__

libclc/clc/include/clc/integer/clc_upsample.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
#ifndef __CLC_INTEGER_CLC_UPSAMPLE_H__
22
#define __CLC_INTEGER_CLC_UPSAMPLE_H__
33

4-
#if defined(CLC_CLSPV) || defined(CLC_SPIRV)
5-
// clspv and spir-v targets provide their own OpenCL-compatible upsample
6-
#define __clc_upsample upsample
7-
#else
8-
94
#include <clc/clctypes.h>
105

116
#define __CLC_UPSAMPLE_DECL(BGENTYPE, GENTYPE, UGENTYPE) \
@@ -33,6 +28,4 @@ __CLC_UPSAMPLE_TYPES()
3328
#undef __CLC_UPSAMPLE_DECL
3429
#undef __CLC_UPSAMPLE_VEC
3530

36-
#endif
37-
3831
#endif // __CLC_INTEGER_CLC_UPSAMPLE_H__

libclc/clc/lib/clspv/SOURCES

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
../generic/integer/clc_clz.cl
2+
../generic/integer/clc_hadd.cl
3+
../generic/integer/clc_mad24.cl
4+
../generic/integer/clc_mul24.cl
5+
../generic/integer/clc_mul_hi.cl
6+
../generic/integer/clc_rhadd.cl
7+
../generic/integer/clc_upsample.cl
18
../generic/math/clc_ceil.cl
29
../generic/math/clc_fabs.cl
310
../generic/math/clc_floor.cl

libclc/clc/lib/spirv/SOURCES

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
../generic/common/clc_radians.cl
33
../generic/common/clc_smoothstep.cl
44
../generic/geometric/clc_dot.cl
5+
../generic/integer/clc_clz.cl
6+
../generic/integer/clc_hadd.cl
7+
../generic/integer/clc_mad24.cl
8+
../generic/integer/clc_mul24.cl
9+
../generic/integer/clc_mul_hi.cl
10+
../generic/integer/clc_rhadd.cl
11+
../generic/integer/clc_upsample.cl
512
../generic/math/clc_ceil.cl
613
../generic/math/clc_fabs.cl
714
../generic/math/clc_floor.cl

0 commit comments

Comments
 (0)