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

[libc][math] Refactor lrint_lround family to header-only (#195441)

Refactors the lrint_lround math family to be header-only.

part of: #147386

Target Functions:
  - llrint
  - llrintbf16
  - llrintf
  - llrintf128
  - llrintf16
  - llrintl
  - llround
  - llroundbf16
  - llroundf
  - llroundf128
  - llroundf16
  - llroundl
  - lrint
  - lrintbf16
  - lrintf
  - lrintf128
  - lrintf16
  - lrintl
  - lround
  - lroundbf16
  - lroundf
  - lroundf128
  - lroundf16
  - lroundl
parent 1ed17610
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
@@ -293,6 +293,18 @@
#include "math/llogbf128.h"
#include "math/llogbf16.h"
#include "math/llogbl.h"
#include "math/llrint.h"
#include "math/llrintbf16.h"
#include "math/llrintf.h"
#include "math/llrintf128.h"
#include "math/llrintf16.h"
#include "math/llrintl.h"
#include "math/llround.h"
#include "math/llroundbf16.h"
#include "math/llroundf.h"
#include "math/llroundf128.h"
#include "math/llroundf16.h"
#include "math/llroundl.h"
#include "math/log.h"
#include "math/log10.h"
#include "math/log10f.h"
@@ -313,6 +325,18 @@
#include "math/logbl.h"
#include "math/logf.h"
#include "math/logf16.h"
#include "math/lrint.h"
#include "math/lrintbf16.h"
#include "math/lrintf.h"
#include "math/lrintf128.h"
#include "math/lrintf16.h"
#include "math/lrintl.h"
#include "math/lround.h"
#include "math/lroundbf16.h"
#include "math/lroundf.h"
#include "math/lroundf128.h"
#include "math/lroundf16.h"
#include "math/lroundl.h"
#include "math/modf.h"
#include "math/modfbf16.h"
#include "math/modff.h"
+23 −0
Original line number Diff line number Diff line
//===-- Shared llrint 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_LLRINT_H
#define LLVM_LIBC_SHARED_MATH_LLRINT_H

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

namespace LIBC_NAMESPACE_DECL {
namespace shared {

using math::llrint;

} // namespace shared
} // namespace LIBC_NAMESPACE_DECL

#endif // LLVM_LIBC_SHARED_MATH_LLRINT_H
+23 −0
Original line number Diff line number Diff line
//===-- Shared llrintbf16 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_LLRINTBF16_H
#define LLVM_LIBC_SHARED_MATH_LLRINTBF16_H

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

namespace LIBC_NAMESPACE_DECL {
namespace shared {

using math::llrintbf16;

} // namespace shared
} // namespace LIBC_NAMESPACE_DECL

#endif // LLVM_LIBC_SHARED_MATH_LLRINTBF16_H
+23 −0
Original line number Diff line number Diff line
//===-- Shared llrintf 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_LLRINTF_H
#define LLVM_LIBC_SHARED_MATH_LLRINTF_H

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

namespace LIBC_NAMESPACE_DECL {
namespace shared {

using math::llrintf;

} // namespace shared
} // namespace LIBC_NAMESPACE_DECL

#endif // LLVM_LIBC_SHARED_MATH_LLRINTF_H
+29 −0
Original line number Diff line number Diff line
//===-- Shared llrintf128 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_LLRINTF128_H
#define LLVM_LIBC_SHARED_MATH_LLRINTF128_H

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

#ifdef LIBC_TYPES_HAS_FLOAT128

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

namespace LIBC_NAMESPACE_DECL {
namespace shared {

using math::llrintf128;

} // namespace shared
} // namespace LIBC_NAMESPACE_DECL

#endif // LIBC_TYPES_HAS_FLOAT128

#endif // LLVM_LIBC_SHARED_MATH_LLRINTF128_H
Loading