Unverified Commit 1b1e14f1 authored by Kiriti Ponduri's avatar Kiriti Ponduri Committed by GitHub
Browse files

[libc][math] Qualify f16add functions to constexpr (#195429)

parent 34a80c90
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@
namespace LIBC_NAMESPACE_DECL {
namespace math {

LIBC_INLINE float16 f16add(double x, double y) {
LIBC_INLINE constexpr float16 f16add(double x, double y) {
  return fputil::generic::add<float16>(x, y);
}

+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@
namespace LIBC_NAMESPACE_DECL {
namespace math {

LIBC_INLINE float16 f16addf(float x, float y) {
LIBC_INLINE constexpr float16 f16addf(float x, float y) {
  return fputil::generic::add<float16>(x, y);
}

+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@
namespace LIBC_NAMESPACE_DECL {
namespace math {

LIBC_INLINE float16 f16addf128(float128 x, float128 y) {
LIBC_INLINE constexpr float16 f16addf128(float128 x, float128 y) {
  return fputil::generic::add<float16>(x, y);
}

+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@
namespace LIBC_NAMESPACE_DECL {
namespace math {

LIBC_INLINE float16 f16addl(long double x, long double y) {
LIBC_INLINE constexpr float16 f16addl(long double x, long double y) {
  return fputil::generic::add<float16>(x, y);
}

+4 −0
Original line number Diff line number Diff line
@@ -454,6 +454,10 @@ add_fp_unittest(
    libc.src.__support.math.dmulf128
    libc.src.__support.math.dmull
    libc.src.__support.math.dsqrtf128
    libc.src.__support.math.f16add
    libc.src.__support.math.f16addf
    libc.src.__support.math.f16addf128
    libc.src.__support.math.f16addl
    libc.src.__support.math.fadd
    libc.src.__support.math.faddf128
    libc.src.__support.math.faddl
Loading