[libc-commits] [libc] [llvm] [libc][math] Refactor hypotf16 to header-only shared math (PR #175438)
Muhammad Bassiouni via libc-commits
libc-commits at lists.llvm.org
Sun Jan 11 14:50:16 PST 2026
================
@@ -0,0 +1,23 @@
+//===-- Shared hypotf16 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_HYPOTF16_H
+#define LLVM_LIBC_SHARED_MATH_HYPOTF16_H
+
+#include "shared/libc_common.h"
+#include "src/__support/math/hypotf16.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace shared {
+
+using math::hypotf16;
+
+} // namespace shared
+} // namespace LIBC_NAMESPACE_DECL
+
----------------
bassiounix wrote:
`float16` is not available for each platform, so we need to guard the code with `LIBC_TYPES_HAS_FLOAT16` to target only supported platforms.
https://github.com/llvm/llvm-project/pull/175438
More information about the libc-commits
mailing list