[libc-commits] [libc] [libc][math][c23] Add fabsf16 C23 math function (PR #93567)

via libc-commits libc-commits at lists.llvm.org
Wed May 29 06:49:13 PDT 2024


================
@@ -0,0 +1,20 @@
+//===-- Definition of float16 type ----------------------------------------===//
+//
+// 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_TYPES_FLOAT16_H
+#define LLVM_LIBC_TYPES_FLOAT16_H
+
+#include "src/__support/macros/properties/compiler.h"
+
+#if defined(__FLT16_MANT_DIG__) &&                                             \
+    (!defined(LIBC_COMPILER_IS_GCC) || LIBC_COMPILER_GCC_VER >= 1301)
+#define LIBC_TYPES_HAS_FLOAT16
+using float16 = _Float16;
----------------
lntue wrote:

We shouldn't export `float16` symbol in the public header here.

https://github.com/llvm/llvm-project/pull/93567


More information about the libc-commits mailing list