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

[libc][math] Refactor fmod-modf family to header-only (#195406)

Refactors the fmod-modf math family to be header-only.

part of: #147386

Target Functions:
  - fmod
  - fmodbf16
  - fmodf
  - fmodf128
  - fmodf16
  - fmodl
  - modf
  - modfbf16
  - modff
  - modff128
  - modff16
  - modfl
parent b2f9210e
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -223,6 +223,12 @@
#include "math/fminimumf16.h"
#include "math/fminimuml.h"
#include "math/fminl.h"
#include "math/fmod.h"
#include "math/fmodbf16.h"
#include "math/fmodf.h"
#include "math/fmodf128.h"
#include "math/fmodf16.h"
#include "math/fmodl.h"
#include "math/frexpf.h"
#include "math/frexpf128.h"
#include "math/frexpf16.h"
@@ -274,6 +280,12 @@
#include "math/logbl.h"
#include "math/logf.h"
#include "math/logf16.h"
#include "math/modf.h"
#include "math/modfbf16.h"
#include "math/modff.h"
#include "math/modff128.h"
#include "math/modff16.h"
#include "math/modfl.h"
#include "math/nextafter.h"
#include "math/nextafterbf16.h"
#include "math/nextafterf.h"
+23 −0
Original line number Diff line number Diff line
//===-- Shared fmod 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_FMOD_H
#define LLVM_LIBC_SHARED_MATH_FMOD_H

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

namespace LIBC_NAMESPACE_DECL {
namespace shared {

using math::fmod;

} // namespace shared
} // namespace LIBC_NAMESPACE_DECL

#endif // LLVM_LIBC_SHARED_MATH_FMOD_H
+23 −0
Original line number Diff line number Diff line
//===-- Shared fmodbf16 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_FMODBF16_H
#define LLVM_LIBC_SHARED_MATH_FMODBF16_H

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

namespace LIBC_NAMESPACE_DECL {
namespace shared {

using math::fmodbf16;

} // namespace shared
} // namespace LIBC_NAMESPACE_DECL

#endif // LLVM_LIBC_SHARED_MATH_FMODBF16_H
+23 −0
Original line number Diff line number Diff line
//===-- Shared fmodf 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_FMODF_H
#define LLVM_LIBC_SHARED_MATH_FMODF_H

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

namespace LIBC_NAMESPACE_DECL {
namespace shared {

using math::fmodf;

} // namespace shared
} // namespace LIBC_NAMESPACE_DECL

#endif // LLVM_LIBC_SHARED_MATH_FMODF_H
+29 −0
Original line number Diff line number Diff line
//===-- Shared fmodf128 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_FMODF128_H
#define LLVM_LIBC_SHARED_MATH_FMODF128_H

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

#ifdef LIBC_TYPES_HAS_FLOAT128

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

namespace LIBC_NAMESPACE_DECL {
namespace shared {

using math::fmodf128;

} // namespace shared
} // namespace LIBC_NAMESPACE_DECL

#endif // LIBC_TYPES_HAS_FLOAT128

#endif // LLVM_LIBC_SHARED_MATH_FMODF128_H
Loading