diff options
| author | Mehdi Amini <joker.eph@gmail.com> | 2025-08-14 15:36:46 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-14 15:36:46 +0200 |
| commit | df57d6a01e85ca78da2febab21b268d9fd6955a0 (patch) | |
| tree | 19b0aab453e6bc7e2b15d3220024dfdacd4fa57e /libc/test/src | |
| parent | df86ea61b7ed484ca797f96d7ad40fd9ada7ba30 (diff) | |
| parent | 7bda76367f19cfc19086f68d9dd5ac019a9ceccd (diff) | |
Merge branch 'main' into users/joker-eph-python-bindings-maintainersusers/joker-eph-python-bindings-maintainers
Diffstat (limited to 'libc/test/src')
| -rw-r--r-- | libc/test/src/math/CMakeLists.txt | 64 | ||||
| -rw-r--r-- | libc/test/src/math/bf16fma_test.cpp | 14 | ||||
| -rw-r--r-- | libc/test/src/math/bf16fmaf128_test.cpp | 14 | ||||
| -rw-r--r-- | libc/test/src/math/bf16fmaf_test.cpp | 14 | ||||
| -rw-r--r-- | libc/test/src/math/bf16fmal_test.cpp | 14 | ||||
| -rw-r--r-- | libc/test/src/math/smoke/CMakeLists.txt | 60 | ||||
| -rw-r--r-- | libc/test/src/math/smoke/bf16fma_test.cpp | 14 | ||||
| -rw-r--r-- | libc/test/src/math/smoke/bf16fmaf128_test.cpp | 14 | ||||
| -rw-r--r-- | libc/test/src/math/smoke/bf16fmaf_test.cpp | 14 | ||||
| -rw-r--r-- | libc/test/src/math/smoke/bf16fmal_test.cpp | 14 |
10 files changed, 236 insertions, 0 deletions
diff --git a/libc/test/src/math/CMakeLists.txt b/libc/test/src/math/CMakeLists.txt index 85dddfb88d7e..11bbf670c98d 100644 --- a/libc/test/src/math/CMakeLists.txt +++ b/libc/test/src/math/CMakeLists.txt @@ -3085,6 +3085,70 @@ add_fp_unittest( ) add_fp_unittest( + bf16fma_test + NEED_MPFR + SUITE + libc-math-unittests + SRCS + bf16fma_test.cpp + HDRS + FmaTest.h + DEPENDS + libc.src.math.bf16fma + libc.src.stdlib.rand + libc.src.stdlib.srand + libc.src.__support.FPUtil.bfloat16 +) + +add_fp_unittest( + bf16fmaf_test + NEED_MPFR + SUITE + libc-math-unittests + SRCS + bf16fmaf_test.cpp + HDRS + FmaTest.h + DEPENDS + libc.src.math.bf16fmaf + libc.src.stdlib.rand + libc.src.stdlib.srand + libc.src.__support.FPUtil.bfloat16 +) + +add_fp_unittest( + bf16fmal_test + NEED_MPFR + SUITE + libc-math-unittests + SRCS + bf16fmal_test.cpp + HDRS + FmaTest.h + DEPENDS + libc.src.math.bf16fmal + libc.src.stdlib.rand + libc.src.stdlib.srand + libc.src.__support.FPUtil.bfloat16 +) + +add_fp_unittest( + bf16fmaf128_test + NEED_MPFR + SUITE + libc-math-unittests + SRCS + bf16fmaf128_test.cpp + HDRS + FmaTest.h + DEPENDS + libc.src.math.bf16fmaf128 + libc.src.stdlib.rand + libc.src.stdlib.srand + libc.src.__support.FPUtil.bfloat16 +) + +add_fp_unittest( bf16mul_test NEED_MPFR SUITE diff --git a/libc/test/src/math/bf16fma_test.cpp b/libc/test/src/math/bf16fma_test.cpp new file mode 100644 index 000000000000..81c73a0cb694 --- /dev/null +++ b/libc/test/src/math/bf16fma_test.cpp @@ -0,0 +1,14 @@ +//===-- Unittests for bf16fma ---------------------------------------------===// +// +// 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 "FmaTest.h" + +#include "src/__support/FPUtil/bfloat16.h" +#include "src/math/bf16fma.h" + +LIST_NARROWING_FMA_TESTS(bfloat16, double, LIBC_NAMESPACE::bf16fma) diff --git a/libc/test/src/math/bf16fmaf128_test.cpp b/libc/test/src/math/bf16fmaf128_test.cpp new file mode 100644 index 000000000000..dd8f4735c349 --- /dev/null +++ b/libc/test/src/math/bf16fmaf128_test.cpp @@ -0,0 +1,14 @@ +//===-- Unittests for bf16fmaf128 -----------------------------------------===// +// +// 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 "FmaTest.h" + +#include "src/__support/FPUtil/bfloat16.h" +#include "src/math/bf16fmaf128.h" + +LIST_NARROWING_FMA_TESTS(bfloat16, float128, LIBC_NAMESPACE::bf16fmaf128) diff --git a/libc/test/src/math/bf16fmaf_test.cpp b/libc/test/src/math/bf16fmaf_test.cpp new file mode 100644 index 000000000000..04c674892833 --- /dev/null +++ b/libc/test/src/math/bf16fmaf_test.cpp @@ -0,0 +1,14 @@ +//===-- Unittests for bf16fmaf --------------------------------------------===// +// +// 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 "FmaTest.h" + +#include "src/__support/FPUtil/bfloat16.h" +#include "src/math/bf16fmaf.h" + +LIST_NARROWING_FMA_TESTS(bfloat16, float, LIBC_NAMESPACE::bf16fmaf) diff --git a/libc/test/src/math/bf16fmal_test.cpp b/libc/test/src/math/bf16fmal_test.cpp new file mode 100644 index 000000000000..4c45e2c64312 --- /dev/null +++ b/libc/test/src/math/bf16fmal_test.cpp @@ -0,0 +1,14 @@ +//===-- Unittests for bf16fmal --------------------------------------------===// +// +// 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 "FmaTest.h" + +#include "src/__support/FPUtil/bfloat16.h" +#include "src/math/bf16fmal.h" + +LIST_NARROWING_FMA_TESTS(bfloat16, long double, LIBC_NAMESPACE::bf16fmal) diff --git a/libc/test/src/math/smoke/CMakeLists.txt b/libc/test/src/math/smoke/CMakeLists.txt index c3df8b1ff2c5..00881bd27f24 100644 --- a/libc/test/src/math/smoke/CMakeLists.txt +++ b/libc/test/src/math/smoke/CMakeLists.txt @@ -5681,6 +5681,66 @@ add_fp_unittest( ) add_fp_unittest( + bf16fma_test + SUITE + libc-math-smoke-tests + SRCS + bf16fma_test.cpp + HDRS + FmaTest.h + DEPENDS + libc.hdr.errno_macros + libc.hdr.fenv_macros + libc.src.math.bf16fma + libc.src.__support.FPUtil.bfloat16 +) + +add_fp_unittest( + bf16fmaf_test + SUITE + libc-math-smoke-tests + SRCS + bf16fmaf_test.cpp + HDRS + FmaTest.h + DEPENDS + libc.hdr.errno_macros + libc.hdr.fenv_macros + libc.src.math.bf16fmaf + libc.src.__support.FPUtil.bfloat16 +) + +add_fp_unittest( + bf16fmal_test + SUITE + libc-math-smoke-tests + SRCS + bf16fmal_test.cpp + HDRS + FmaTest.h + DEPENDS + libc.hdr.errno_macros + libc.hdr.fenv_macros + libc.src.math.bf16fmal + libc.src.__support.FPUtil.bfloat16 +) + +add_fp_unittest( + bf16fmaf128_test + SUITE + libc-math-smoke-tests + SRCS + bf16fmaf128_test.cpp + HDRS + FmaTest.h + DEPENDS + libc.hdr.errno_macros + libc.hdr.fenv_macros + libc.src.math.bf16fmaf128 + libc.src.__support.FPUtil.bfloat16 +) + +add_fp_unittest( bf16div_test SUITE libc-math-smoke-tests diff --git a/libc/test/src/math/smoke/bf16fma_test.cpp b/libc/test/src/math/smoke/bf16fma_test.cpp new file mode 100644 index 000000000000..81c73a0cb694 --- /dev/null +++ b/libc/test/src/math/smoke/bf16fma_test.cpp @@ -0,0 +1,14 @@ +//===-- Unittests for bf16fma ---------------------------------------------===// +// +// 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 "FmaTest.h" + +#include "src/__support/FPUtil/bfloat16.h" +#include "src/math/bf16fma.h" + +LIST_NARROWING_FMA_TESTS(bfloat16, double, LIBC_NAMESPACE::bf16fma) diff --git a/libc/test/src/math/smoke/bf16fmaf128_test.cpp b/libc/test/src/math/smoke/bf16fmaf128_test.cpp new file mode 100644 index 000000000000..dd8f4735c349 --- /dev/null +++ b/libc/test/src/math/smoke/bf16fmaf128_test.cpp @@ -0,0 +1,14 @@ +//===-- Unittests for bf16fmaf128 -----------------------------------------===// +// +// 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 "FmaTest.h" + +#include "src/__support/FPUtil/bfloat16.h" +#include "src/math/bf16fmaf128.h" + +LIST_NARROWING_FMA_TESTS(bfloat16, float128, LIBC_NAMESPACE::bf16fmaf128) diff --git a/libc/test/src/math/smoke/bf16fmaf_test.cpp b/libc/test/src/math/smoke/bf16fmaf_test.cpp new file mode 100644 index 000000000000..04c674892833 --- /dev/null +++ b/libc/test/src/math/smoke/bf16fmaf_test.cpp @@ -0,0 +1,14 @@ +//===-- Unittests for bf16fmaf --------------------------------------------===// +// +// 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 "FmaTest.h" + +#include "src/__support/FPUtil/bfloat16.h" +#include "src/math/bf16fmaf.h" + +LIST_NARROWING_FMA_TESTS(bfloat16, float, LIBC_NAMESPACE::bf16fmaf) diff --git a/libc/test/src/math/smoke/bf16fmal_test.cpp b/libc/test/src/math/smoke/bf16fmal_test.cpp new file mode 100644 index 000000000000..4c45e2c64312 --- /dev/null +++ b/libc/test/src/math/smoke/bf16fmal_test.cpp @@ -0,0 +1,14 @@ +//===-- Unittests for bf16fmal --------------------------------------------===// +// +// 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 "FmaTest.h" + +#include "src/__support/FPUtil/bfloat16.h" +#include "src/math/bf16fmal.h" + +LIST_NARROWING_FMA_TESTS(bfloat16, long double, LIBC_NAMESPACE::bf16fmal) |
