[libc-commits] [libc] [libc][math][c23] Add f16divf C23 math function (PR #96131)
via libc-commits
libc-commits at lists.llvm.org
Fri Jun 21 18:14:55 PDT 2024
================
@@ -0,0 +1,67 @@
+//===-- Utility class to test different flavors of float div --------------===//
+//
+// 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_TEST_SRC_MATH_SMOKE_DIVTEST_H
+#define LLVM_LIBC_TEST_SRC_MATH_SMOKE_DIVTEST_H
+
+#include "hdr/fenv_macros.h"
+#include "test/UnitTest/FEnvSafeTest.h"
+#include "test/UnitTest/FPMatcher.h"
+#include "test/UnitTest/Test.h"
+
+template <typename OutType, typename InType>
+class DivTest : public LIBC_NAMESPACE::testing::FEnvSafeTest {
+
+ DECLARE_SPECIAL_CONSTANTS(OutType)
+
+public:
+ typedef OutType (*DivFunc)(InType, InType);
+
----------------
overmighty wrote:
Should probably use `using OutType = ...;` instead in C++.
https://github.com/llvm/llvm-project/pull/96131
More information about the libc-commits
mailing list