Skip to content

Commit

Permalink
[libclc] Delete the wrong file name in the SOURCE file, and add a new…
Browse files Browse the repository at this point in the history
… 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’.
  • Loading branch information
GYDmedwin authored Nov 19, 2021
1 parent 789ec8b commit f074774
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
2 changes: 0 additions & 2 deletions libclc/amdgcn-amdhsa/libspirv/SOURCES
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@ math/expm1.cl
math/fabs.cl
math/fdim.cl
math/floor.cl
math/fma.cl
math/fmax.cl
math/fmin.cl
math/fmod.cl
math/frexp.cl
math/hypot.cl
math/ilogb.cl
math/ldexp.cl
math/lgamma.cl
math/log.cl
Expand Down
5 changes: 0 additions & 5 deletions libclc/amdgcn-amdhsa/libspirv/math/ldexp.cl
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@
double __ocml_ldexp_f64(double, int);
float __ocml_ldexp_f32(float, int);

#define __CLC_FUNCTION __spirv_ocl_ldexp
#define __CLC_BUILTIN __ocml_ldexp
#define __CLC_BUILTIN_F __CLC_XCONCAT(__CLC_BUILTIN, _f32)
#define __CLC_BUILTIN_D __CLC_XCONCAT(__CLC_BUILTIN, _f64)

_CLC_DEFINE_BINARY_BUILTIN(float, __spirv_ocl_ldexp, __ocml_ldexp_f32, float, int)
_CLC_DEFINE_BINARY_BUILTIN(float, __spirv_ocl_ldexp, __ocml_ldexp_f32, float, uint)

Expand Down
20 changes: 20 additions & 0 deletions libclc/amdgcn-amdhsa/libspirv/math/sinh.cl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include <clcmacro.h>
#include <spirv/spirv.h>

double __ocml_sinh_f64(double);
float __ocml_sinh_f32(float);

#define __CLC_FUNCTION __spirv_ocl_sinh
#define __CLC_BUILTIN __ocml_sinh
#define __CLC_BUILTIN_F __CLC_XCONCAT(__CLC_BUILTIN, _f32)
#define __CLC_BUILTIN_D __CLC_XCONCAT(__CLC_BUILTIN, _f64)
#include <math/unary_builtin.inc>

0 comments on commit f074774

Please sign in to comment.