Skip to content

Commit 9440610

Browse files
authored
[libclc] Reduce OpenCL builtins diff with upstream (#18574)
This commit removes some unused files and otherwise reduces the diff with upstream's libclc in the non-atomic and non-workitem categories. Further work will be required to sort out those categories.
1 parent f460d2d commit 9440610

File tree

26 files changed

+58
-1254
lines changed

26 files changed

+58
-1254
lines changed

libclc/clc/include/clc/clcfunc.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,20 @@
2626
#define _CLC_DEF __attribute__((always_inline))
2727
#endif
2828

29+
#if __OPENCL_C_VERSION__ == CL_VERSION_2_0 || \
30+
(__OPENCL_C_VERSION__ >= CL_VERSION_3_0 && \
31+
defined(__opencl_c_generic_address_space))
32+
#define _CLC_GENERIC_AS_SUPPORTED 1
33+
// Note that we hard-code the assumption that a non-distinct address space means
34+
// that the target maps the generic address space to the private address space.
35+
#ifdef __CLC_DISTINCT_GENERIC_ADDRSPACE__
36+
#define _CLC_DISTINCT_GENERIC_AS_SUPPORTED 1
37+
#else
38+
#define _CLC_DISTINCT_GENERIC_AS_SUPPORTED 0
39+
#endif
40+
#else
41+
#define _CLC_GENERIC_AS_SUPPORTED 0
42+
#define _CLC_DISTINCT_GENERIC_AS_SUPPORTED 0
43+
#endif
44+
2945
#endif // __CLC_CLCFUNC_H_

libclc/clc/include/clc/math/clc_fract.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#ifndef __CLC_MATH_CLC_FRACT_H__
1010
#define __CLC_MATH_CLC_FRACT_H__
1111

12+
#include <clc/internal/clc.h>
13+
1214
#define __CLC_FUNCTION __clc_fract
1315
#define __CLC_BODY <clc/math/unary_decl_with_ptr.inc>
1416

libclc/clc/include/clc/math/clc_frexp.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#ifndef __CLC_MATH_CLC_FREXP_H__
1010
#define __CLC_MATH_CLC_FREXP_H__
1111

12+
#include <clc/internal/clc.h>
13+
1214
#define __CLC_FUNCTION __clc_frexp
1315
#define __CLC_BODY <clc/math/unary_decl_with_int_ptr.inc>
1416
#include <clc/math/gentype.inc>

libclc/clc/include/clc/math/clc_lgamma_r.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#ifndef __CLC_MATH_CLC_LGAMMA_R_H__
1010
#define __CLC_MATH_CLC_LGAMMA_R_H__
1111

12+
#include <clc/internal/clc.h>
13+
1214
#define __CLC_FUNCTION __clc_lgamma_r
1315
#define __CLC_BODY <clc/math/unary_decl_with_int_ptr.inc>
1416

libclc/clc/include/clc/math/clc_modf.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#ifndef __CLC_MATH_CLC_MODF_H__
1010
#define __CLC_MATH_CLC_MODF_H__
1111

12+
#include <clc/internal/clc.h>
13+
1214
#define __CLC_FUNCTION __clc_modf
1315
#define __CLC_BODY <clc/math/unary_decl_with_ptr.inc>
1416
#include <clc/math/gentype.inc>

libclc/clc/include/clc/math/clc_sincos.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#ifndef __CLC_MATH_CLC_SINCOS_H__
1010
#define __CLC_MATH_CLC_SINCOS_H__
1111

12+
#include <clc/internal/clc.h>
13+
1214
#define __CLC_BODY <clc/math/unary_decl_with_ptr.inc>
1315
#define __CLC_FUNCTION __clc_sincos
1416

libclc/generic/include/as_type.h

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

0 commit comments

Comments
 (0)