Unverified Commit a7f6a6f6 authored by Anonmiraj's avatar Anonmiraj Committed by GitHub
Browse files

[libc][math] Refactor fmul-fsub-frexp family to header-only (#195431)



Refactors the fmul-fsub-frexp math family to be header-only.

part of: #147386

Target Functions:
  - fmul
  - fmulf128
  - fmull
  - fsub
  - fsubf128
  - fsubl
  - frexp
  - frexpbf16
  - frexpl

Co-authored-by: default avatarMuhammad Bassiouni <60100307+bassiounix@users.noreply.github.com>
parent d22b41d3
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -238,9 +238,15 @@
#include "math/fmodf128.h"
#include "math/fmodf16.h"
#include "math/fmodl.h"
#include "math/fmul.h"
#include "math/fmulf128.h"
#include "math/fmull.h"
#include "math/frexp.h"
#include "math/frexpbf16.h"
#include "math/frexpf.h"
#include "math/frexpf128.h"
#include "math/frexpf16.h"
#include "math/frexpl.h"
#include "math/fromfp.h"
#include "math/fromfpbf16.h"
#include "math/fromfpf.h"
@@ -256,6 +262,9 @@
#include "math/fsqrt.h"
#include "math/fsqrtf128.h"
#include "math/fsqrtl.h"
#include "math/fsub.h"
#include "math/fsubf128.h"
#include "math/fsubl.h"
#include "math/getpayload.h"
#include "math/getpayloadbf16.h"
#include "math/getpayloadf.h"
+23 −0
Original line number Diff line number Diff line
//===-- Shared fmul function ------------------------------------*- 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_SHARED_MATH_FMUL_H
#define LLVM_LIBC_SHARED_MATH_FMUL_H

#include "shared/libc_common.h"
#include "src/__support/math/fmul.h"

namespace LIBC_NAMESPACE_DECL {
namespace shared {

using math::fmul;

} // namespace shared
} // namespace LIBC_NAMESPACE_DECL

#endif // LLVM_LIBC_SHARED_MATH_FMUL_H
+29 −0
Original line number Diff line number Diff line
//===-- Shared fmulf128 function --------------------------------*- 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_SHARED_MATH_FMULF128_H
#define LLVM_LIBC_SHARED_MATH_FMULF128_H

#include "include/llvm-libc-types/float128.h"

#ifdef LIBC_TYPES_HAS_FLOAT128

#include "shared/libc_common.h"
#include "src/__support/math/fmulf128.h"

namespace LIBC_NAMESPACE_DECL {
namespace shared {

using math::fmulf128;

} // namespace shared
} // namespace LIBC_NAMESPACE_DECL

#endif // LIBC_TYPES_HAS_FLOAT128

#endif // LLVM_LIBC_SHARED_MATH_FMULF128_H
+23 −0
Original line number Diff line number Diff line
//===-- Shared fmull function -----------------------------------*- 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_SHARED_MATH_FMULL_H
#define LLVM_LIBC_SHARED_MATH_FMULL_H

#include "shared/libc_common.h"
#include "src/__support/math/fmull.h"

namespace LIBC_NAMESPACE_DECL {
namespace shared {

using math::fmull;

} // namespace shared
} // namespace LIBC_NAMESPACE_DECL

#endif // LLVM_LIBC_SHARED_MATH_FMULL_H
+23 −0
Original line number Diff line number Diff line
//===-- Shared frexp function -----------------------------------*- 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_SHARED_MATH_FREXP_H
#define LLVM_LIBC_SHARED_MATH_FREXP_H

#include "shared/libc_common.h"
#include "src/__support/math/frexp.h"

namespace LIBC_NAMESPACE_DECL {
namespace shared {

using math::frexp;

} // namespace shared
} // namespace LIBC_NAMESPACE_DECL

#endif // LLVM_LIBC_SHARED_MATH_FREXP_H
Loading