Skip to content

Commit ca117e3

Browse files
committed
undo spir-v changes
1 parent edb2d88 commit ca117e3

File tree

9 files changed

+7
-108
lines changed

9 files changed

+7
-108
lines changed

libclc/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -360,12 +360,6 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
360360

361361
set( clc_build_flags ${build_flags} -DCLC_INTERNAL )
362362

363-
# clspv and spir-v targets remap some CLC functions to OpenCL builtins.
364-
# Automatically provide those declarations to the compiler for CLC builtins.
365-
if ( ARCH STREQUAL spirv OR ARCH STREQUAL spirv64 OR ARCH STREQUAL clspv OR ARCH STREQUAL clspv64 )
366-
list( APPEND clc_build_flags -Xclang -fdeclare-opencl-builtins )
367-
endif()
368-
369363
add_libclc_builtin_set(
370364
CLC_INTERNAL
371365
ARCH ${ARCH}
Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
11
#ifndef __CLC_COMMON_CLC_SIGN_H__
22
#define __CLC_COMMON_CLC_SIGN_H__
33

4-
#if defined(CLC_CLSPV)
5-
// clspv targets provide their own OpenCL-compatible sign
6-
#define __clc_sign sign
7-
#else
8-
94
#define __CLC_FUNCTION __clc_sign
105
#define __CLC_BODY <clc/math/unary_decl.inc>
116
#include <clc/math/gentype.inc>
127
#undef __CLC_FUNCTION
138
#undef __CLC_BODY
149

15-
#endif
16-
1710
#endif // __CLC_COMMON_CLC_SIGN_H__

libclc/clc/include/clc/common/floatn.inc

Lines changed: 0 additions & 85 deletions
This file was deleted.

libclc/clc/include/clc/relational/clc_isnan.h

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

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

@@ -37,6 +32,4 @@ _CLC_VECTOR_ISNAN_DECL(short, half)
3732
#undef _CLC_ISNAN_DECL
3833
#undef _CLC_VECTOR_ISNAN_DECL
3934

40-
#endif
41-
4235
#endif // __CLC_RELATIONAL_CLC_ISNAN_H__

libclc/clc/include/clc/common/unary_def.inc renamed to libclc/clc/include/clc/shared/unary_def.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
#define __CLC_FUNCTION(x) __CLC_CONCAT(__clc_, x)
55
#endif
66

7-
_CLC_OVERLOAD _CLC_DEF __CLC_FLOATN FUNCTION(__CLC_FLOATN a) {
7+
_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE FUNCTION(__CLC_GENTYPE a) {
88
return __CLC_FUNCTION(FUNCTION)(a);
99
}

libclc/clc/lib/clspv/SOURCES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
../generic/common/clc_sign.cl
12
../generic/math/clc_ceil.cl
23
../generic/math/clc_fabs.cl
34
../generic/math/clc_floor.cl
45
../generic/math/clc_mad.cl
56
../generic/math/clc_rint.cl
67
../generic/math/clc_trunc.cl
8+
../generic/relational/clc_isnan.cl
79
../generic/relational/clc_select.cl
810
../generic/shared/clc_clamp.cl

libclc/clc/lib/spirv/SOURCES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
../generic/math/clc_mad.cl
1010
../generic/math/clc_rint.cl
1111
../generic/math/clc_trunc.cl
12+
../generic/relational/clc_isnan.cl
1213
../generic/relational/clc_select.cl
1314
../generic/shared/clc_clamp.cl

libclc/clc/lib/spirv64/SOURCES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
../generic/math/clc_mad.cl
1010
../generic/math/clc_rint.cl
1111
../generic/math/clc_trunc.cl
12+
../generic/relational/clc_isnan.cl
1213
../generic/relational/clc_select.cl
1314
../generic/shared/clc_clamp.cl

libclc/generic/lib/common/sign.cl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
#include <clc/common/clc_sign.h>
44

55
#define FUNCTION sign
6-
#define __CLC_BODY "unary_def.inc"
6+
#define __CLC_BODY <clc/shared/unary_def.inc>
77

8-
#include <clc/common/floatn.inc>
8+
#include <clc/math/gentype.inc>

0 commit comments

Comments
 (0)