[libc-commits] [libc] [libc][math][c++23] Implement basic arithmetic operations for BFloat16 (PR #151228)

via libc-commits libc-commits at lists.llvm.org
Sat Aug 2 04:44:09 PDT 2025


================
@@ -0,0 +1,15 @@
+//===-- Unittests for bfloat16 addition -----------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#include "AddTest.h"
+
+#include "src/__support/FPUtil/bfloat16.h"
+
+static inline bfloat16 add_func(bfloat16 x, bfloat16 y) { return x + y; }
----------------
overmighty wrote:

No need for `inline` here. Same for other test files.

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


More information about the libc-commits mailing list