Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 34 additions & 3 deletions libc/config/gpu/entrypoints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,19 @@ set(TARGET_LIBC_ENTRYPOINTS

set(TARGET_LIBM_ENTRYPOINTS
# math.h entrypoints
libc.src.math.acos
libc.src.math.acosf
libc.src.math.acosh
libc.src.math.acoshf
libc.src.math.asin
libc.src.math.asinf
libc.src.math.asinh
libc.src.math.asinhf
libc.src.math.atan
libc.src.math.atanf
libc.src.math.atan2
libc.src.math.atan2f
libc.src.math.atanh
libc.src.math.atanhf
libc.src.math.ceil
libc.src.math.ceilf
Expand All @@ -127,9 +135,15 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.cosf
libc.src.math.cosh
libc.src.math.coshf
libc.src.math.erf
libc.src.math.erff
libc.src.math.exp10
libc.src.math.exp10f
libc.src.math.exp2
libc.src.math.exp2f
libc.src.math.exp
libc.src.math.expf
libc.src.math.expm1
libc.src.math.expm1f
libc.src.math.fabs
libc.src.math.fabsf
Expand Down Expand Up @@ -157,15 +171,26 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.llrintf
libc.src.math.llround
libc.src.math.llroundf
libc.src.math.pow
libc.src.math.powf
libc.src.math.sin
libc.src.math.log10
libc.src.math.log10f
libc.src.math.log1p
libc.src.math.log1pf
libc.src.math.log2
libc.src.math.log2f
libc.src.math.log
libc.src.math.logf
libc.src.math.lrint
libc.src.math.lrintf
libc.src.math.lround
libc.src.math.lroundf
libc.src.math.modf
libc.src.math.modff
libc.src.math.nearbyint
libc.src.math.nearbyintf
libc.src.math.nextafter
libc.src.math.nextafterf
libc.src.math.pow
libc.src.math.powf
libc.src.math.remainder
libc.src.math.remainderf
libc.src.math.remquo
Expand All @@ -176,6 +201,10 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.roundf
libc.src.math.scalbn
libc.src.math.scalbnf
libc.src.math.sin
libc.src.math.sinf
libc.src.math.sincos
libc.src.math.sincosf
libc.src.math.sinh
libc.src.math.sinhf
libc.src.math.sqrt
Expand All @@ -184,6 +213,8 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.tanf
libc.src.math.tanh
libc.src.math.tanhf
libc.src.math.tgamma
libc.src.math.tgammaf
libc.src.math.trunc
libc.src.math.truncf
)
Expand Down
15 changes: 15 additions & 0 deletions libc/src/math/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,23 @@ function(add_math_entrypoint_object name)
)
endfunction()

add_math_entrypoint_object(acos)
add_math_entrypoint_object(acosf)
add_math_entrypoint_object(acosh)
add_math_entrypoint_object(acoshf)

add_math_entrypoint_object(asin)
add_math_entrypoint_object(asinf)
add_math_entrypoint_object(asinh)
add_math_entrypoint_object(asinhf)

add_math_entrypoint_object(atan)
add_math_entrypoint_object(atanf)

add_math_entrypoint_object(atan2)
add_math_entrypoint_object(atan2f)

add_math_entrypoint_object(atanh)
add_math_entrypoint_object(atanhf)

add_math_entrypoint_object(ceil)
Expand All @@ -77,6 +86,7 @@ add_math_entrypoint_object(cosf)
add_math_entrypoint_object(cosh)
add_math_entrypoint_object(coshf)

add_math_entrypoint_object(erf)
add_math_entrypoint_object(erff)

add_math_entrypoint_object(exp)
Expand All @@ -88,6 +98,7 @@ add_math_entrypoint_object(exp2f)
add_math_entrypoint_object(exp10)
add_math_entrypoint_object(exp10f)

add_math_entrypoint_object(expm1)
add_math_entrypoint_object(expm1f)

add_math_entrypoint_object(fabs)
Expand Down Expand Up @@ -198,6 +209,7 @@ add_math_entrypoint_object(scalbn)
add_math_entrypoint_object(scalbnf)
add_math_entrypoint_object(scalbnl)

add_math_entrypoint_object(sincos)
add_math_entrypoint_object(sincosf)

add_math_entrypoint_object(sin)
Expand All @@ -216,6 +228,9 @@ add_math_entrypoint_object(tanf)
add_math_entrypoint_object(tanh)
add_math_entrypoint_object(tanhf)

add_math_entrypoint_object(tgamma)
add_math_entrypoint_object(tgammaf)

add_math_entrypoint_object(trunc)
add_math_entrypoint_object(truncf)
add_math_entrypoint_object(truncl)
18 changes: 18 additions & 0 deletions libc/src/math/acos.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//===-- Implementation header for acos --------------------------*- C++ -*-===//
//
// 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
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_ACOS_H
#define LLVM_LIBC_SRC_MATH_ACOS_H

namespace __llvm_libc {

double acos(double x);

} // namespace __llvm_libc

#endif // LLVM_LIBC_SRC_MATH_ACOS_H
18 changes: 18 additions & 0 deletions libc/src/math/acosh.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//===-- Implementation header for acosh -------------------------*- C++ -*-===//
//
// 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
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_ACOSH_H
#define LLVM_LIBC_SRC_MATH_ACOSH_H

namespace __llvm_libc {

double acosh(double x);

} // namespace __llvm_libc

#endif // LLVM_LIBC_SRC_MATH_ACOSH_H
18 changes: 18 additions & 0 deletions libc/src/math/asin.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//===-- Implementation header for asin --------------------------*- C++ -*-===//
//
// 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
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_ASIN_H
#define LLVM_LIBC_SRC_MATH_ASIN_H

namespace __llvm_libc {

double asin(double x);

} // namespace __llvm_libc

#endif // LLVM_LIBC_SRC_MATH_ASIN_H
18 changes: 18 additions & 0 deletions libc/src/math/asinh.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//===-- Implementation header for asinh -------------------------*- C++ -*-===//
//
// 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
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_ASINH_H
#define LLVM_LIBC_SRC_MATH_ASINH_H

namespace __llvm_libc {

double asinh(double x);

} // namespace __llvm_libc

#endif // LLVM_LIBC_SRC_MATH_ASINH_H
18 changes: 18 additions & 0 deletions libc/src/math/atan.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//===-- Implementation header for atan --------------------------*- C++ -*-===//
//
// 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
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_ATAN_H
#define LLVM_LIBC_SRC_MATH_ATAN_H

namespace __llvm_libc {

double atan(double x);

} // namespace __llvm_libc

#endif // LLVM_LIBC_SRC_MATH_ATAN_H
18 changes: 18 additions & 0 deletions libc/src/math/atan2.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//===-- Implementation header for atan2 -------------------------*- C++ -*-===//
//
// 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
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_ATAN2_H
#define LLVM_LIBC_SRC_MATH_ATAN2_H

namespace __llvm_libc {

double atan2(double x, double y);

} // namespace __llvm_libc

#endif // LLVM_LIBC_SRC_MATH_ATAN2_H
18 changes: 18 additions & 0 deletions libc/src/math/atan2f.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//===-- Implementation header for atan2f ------------------------*- C++ -*-===//
//
// 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
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_ATAN2F_H
#define LLVM_LIBC_SRC_MATH_ATAN2F_H

namespace __llvm_libc {

float atan2f(float x, float y);

} // namespace __llvm_libc

#endif // LLVM_LIBC_SRC_MATH_ATAN2F_H
18 changes: 18 additions & 0 deletions libc/src/math/atanh.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//===-- Implementation header for atanh -------------------------*- C++ -*-===//
//
// 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
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_ATANH_H
#define LLVM_LIBC_SRC_MATH_ATANH_H

namespace __llvm_libc {

double atanh(double x);

} // namespace __llvm_libc

#endif // LLVM_LIBC_SRC_MATH_ATANH_H
18 changes: 18 additions & 0 deletions libc/src/math/erf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//===-- Implementation header for erf ---------------------------*- C++ -*-===//
//
// 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
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_ERF_H
#define LLVM_LIBC_SRC_MATH_ERF_H

namespace __llvm_libc {

double erf(double x);

} // namespace __llvm_libc

#endif // LLVM_LIBC_SRC_MATH_ERF_H
18 changes: 18 additions & 0 deletions libc/src/math/expm1.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//===-- Implementation header for expm1 -------------------------*- C++ -*-===//
//
// 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
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_EXPM1_H
#define LLVM_LIBC_SRC_MATH_EXPM1_H

namespace __llvm_libc {

double expm1(double x);

} // namespace __llvm_libc

#endif // LLVM_LIBC_SRC_MATH_EXPM1_H
Loading