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

[libc][math] Refactor fromfp family to header-only (#195413)

Refactors the fromfp math family to be header-only.

part of: #147386

Target Functions:
  - fromfp
  - fromfpbf16
  - fromfpf
  - fromfpf128
  - fromfpf16
  - fromfpl
  - fromfpx
  - fromfpxbf16
  - fromfpxf
  - fromfpxf128
  - fromfpxf16
  - fromfpxl
parent 61a401e3
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -232,6 +232,18 @@
#include "math/frexpf.h"
#include "math/frexpf128.h"
#include "math/frexpf16.h"
#include "math/fromfp.h"
#include "math/fromfpbf16.h"
#include "math/fromfpf.h"
#include "math/fromfpf128.h"
#include "math/fromfpf16.h"
#include "math/fromfpl.h"
#include "math/fromfpx.h"
#include "math/fromfpxbf16.h"
#include "math/fromfpxf.h"
#include "math/fromfpxf128.h"
#include "math/fromfpxf16.h"
#include "math/fromfpxl.h"
#include "math/fsqrt.h"
#include "math/fsqrtf128.h"
#include "math/fsqrtl.h"
+23 −0
Original line number Diff line number Diff line
//===-- Shared fromfp 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_FROMFP_H
#define LLVM_LIBC_SHARED_MATH_FROMFP_H

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

namespace LIBC_NAMESPACE_DECL {
namespace shared {

using math::fromfp;

} // namespace shared
} // namespace LIBC_NAMESPACE_DECL

#endif // LLVM_LIBC_SHARED_MATH_FROMFP_H
+23 −0
Original line number Diff line number Diff line
//===-- Shared fromfpbf16 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_FROMFPBF16_H
#define LLVM_LIBC_SHARED_MATH_FROMFPBF16_H

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

namespace LIBC_NAMESPACE_DECL {
namespace shared {

using math::fromfpbf16;

} // namespace shared
} // namespace LIBC_NAMESPACE_DECL

#endif // LLVM_LIBC_SHARED_MATH_FROMFPBF16_H
+23 −0
Original line number Diff line number Diff line
//===-- Shared fromfpf 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_FROMFPF_H
#define LLVM_LIBC_SHARED_MATH_FROMFPF_H

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

namespace LIBC_NAMESPACE_DECL {
namespace shared {

using math::fromfpf;

} // namespace shared
} // namespace LIBC_NAMESPACE_DECL

#endif // LLVM_LIBC_SHARED_MATH_FROMFPF_H
+29 −0
Original line number Diff line number Diff line
//===-- Shared fromfpf128 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_FROMFPF128_H
#define LLVM_LIBC_SHARED_MATH_FROMFPF128_H

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

#ifdef LIBC_TYPES_HAS_FLOAT128

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

namespace LIBC_NAMESPACE_DECL {
namespace shared {

using math::fromfpf128;

} // namespace shared
} // namespace LIBC_NAMESPACE_DECL

#endif // LIBC_TYPES_HAS_FLOAT128

#endif // LLVM_LIBC_SHARED_MATH_FROMFPF128_H
Loading