Skip to content

Commit f074774

Browse files
authored
[libclc] Delete the wrong file name in the SOURCE file, and add a new implementation file. (#4997)
Remove the unimplemented file name in the SOURCE file: ‘ilogb’ and 'fma'. At the same time, I added the sinh.cl file to ensure correct compilation.In addition, I deleted the redundant code in ‘ldexp’.
1 parent 789ec8b commit f074774

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

libclc/amdgcn-amdhsa/libspirv/SOURCES

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,11 @@ math/expm1.cl
2323
math/fabs.cl
2424
math/fdim.cl
2525
math/floor.cl
26-
math/fma.cl
2726
math/fmax.cl
2827
math/fmin.cl
2928
math/fmod.cl
3029
math/frexp.cl
3130
math/hypot.cl
32-
math/ilogb.cl
3331
math/ldexp.cl
3432
math/lgamma.cl
3533
math/log.cl

libclc/amdgcn-amdhsa/libspirv/math/ldexp.cl

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@
1414
double __ocml_ldexp_f64(double, int);
1515
float __ocml_ldexp_f32(float, int);
1616

17-
#define __CLC_FUNCTION __spirv_ocl_ldexp
18-
#define __CLC_BUILTIN __ocml_ldexp
19-
#define __CLC_BUILTIN_F __CLC_XCONCAT(__CLC_BUILTIN, _f32)
20-
#define __CLC_BUILTIN_D __CLC_XCONCAT(__CLC_BUILTIN, _f64)
21-
2217
_CLC_DEFINE_BINARY_BUILTIN(float, __spirv_ocl_ldexp, __ocml_ldexp_f32, float, int)
2318
_CLC_DEFINE_BINARY_BUILTIN(float, __spirv_ocl_ldexp, __ocml_ldexp_f32, float, uint)
2419

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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 <clcmacro.h>
10+
#include <spirv/spirv.h>
11+
12+
double __ocml_sinh_f64(double);
13+
float __ocml_sinh_f32(float);
14+
15+
#define __CLC_FUNCTION __spirv_ocl_sinh
16+
#define __CLC_BUILTIN __ocml_sinh
17+
#define __CLC_BUILTIN_F __CLC_XCONCAT(__CLC_BUILTIN, _f32)
18+
#define __CLC_BUILTIN_D __CLC_XCONCAT(__CLC_BUILTIN, _f64)
19+
#include <math/unary_builtin.inc>
20+

0 commit comments

Comments
 (0)