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

[libc][math] Refactor remainder-remquo family to header-only (#195421)

Refactors the remainder-remquo math family to be header-only.

part of: #147386

Target Functions:
  - remainder
  - remainderbf16
  - remainderf
  - remainderf128
  - remainderf16
  - remainderl
  - remquo
  - remquobf16
  - remquof
  - remquof128
  - remquof16
  - remquol
parent 31068f33
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -332,6 +332,18 @@
#include "math/nextupl.h"
#include "math/pow.h"
#include "math/powf.h"
#include "math/remainder.h"
#include "math/remainderbf16.h"
#include "math/remainderf.h"
#include "math/remainderf128.h"
#include "math/remainderf16.h"
#include "math/remainderl.h"
#include "math/remquo.h"
#include "math/remquobf16.h"
#include "math/remquof.h"
#include "math/remquof128.h"
#include "math/remquof16.h"
#include "math/remquol.h"
#include "math/rsqrtf.h"
#include "math/rsqrtf16.h"
#include "math/setpayload.h"
+23 −0
Original line number Diff line number Diff line
//===-- Shared remainder 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_REMAINDER_H
#define LLVM_LIBC_SHARED_MATH_REMAINDER_H

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

namespace LIBC_NAMESPACE_DECL {
namespace shared {

using math::remainder;

} // namespace shared
} // namespace LIBC_NAMESPACE_DECL

#endif // LLVM_LIBC_SHARED_MATH_REMAINDER_H
+23 −0
Original line number Diff line number Diff line
//===-- Shared remainderbf16 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_REMAINDERBF16_H
#define LLVM_LIBC_SHARED_MATH_REMAINDERBF16_H

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

namespace LIBC_NAMESPACE_DECL {
namespace shared {

using math::remainderbf16;

} // namespace shared
} // namespace LIBC_NAMESPACE_DECL

#endif // LLVM_LIBC_SHARED_MATH_REMAINDERBF16_H
+23 −0
Original line number Diff line number Diff line
//===-- Shared remainderf 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_REMAINDERF_H
#define LLVM_LIBC_SHARED_MATH_REMAINDERF_H

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

namespace LIBC_NAMESPACE_DECL {
namespace shared {

using math::remainderf;

} // namespace shared
} // namespace LIBC_NAMESPACE_DECL

#endif // LLVM_LIBC_SHARED_MATH_REMAINDERF_H
+29 −0
Original line number Diff line number Diff line
//===-- Shared remainderf128 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_REMAINDERF128_H
#define LLVM_LIBC_SHARED_MATH_REMAINDERF128_H

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

#ifdef LIBC_TYPES_HAS_FLOAT128

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

namespace LIBC_NAMESPACE_DECL {
namespace shared {

using math::remainderf128;

} // namespace shared
} // namespace LIBC_NAMESPACE_DECL

#endif // LIBC_TYPES_HAS_FLOAT128

#endif // LLVM_LIBC_SHARED_MATH_REMAINDERF128_H
Loading