|
| 1 | +From 4baba6630c624b8a91584bf9b9488c77deb5cd88 Mon Sep 17 00:00:00 2001 |
| 2 | +From: serge-sans-paille <sergesanspaille@free.fr> |
| 3 | +Date: Sun, 18 Jan 2026 22:58:22 +0100 |
| 4 | +Subject: [PATCH] [test] Increase range of tested rounded values |
| 5 | + |
| 6 | +Otherwise 512bit floats are never tested. |
| 7 | +--- |
| 8 | + test/test_rounding.cpp | 26 +++++++++++++++++--------- |
| 9 | + 1 file changed, 17 insertions(+), 9 deletions(-) |
| 10 | + |
| 11 | +diff --git a/test/test_rounding.cpp b/test/test_rounding.cpp |
| 12 | +index aa7f2b5a5..e4dab459b 100644 |
| 13 | +--- a/test/test_rounding.cpp |
| 14 | ++++ b/test/test_rounding.cpp |
| 15 | +@@ -23,7 +23,7 @@ struct rounding_test |
| 16 | + using int_value_type = xsimd::as_integer_t<value_type>; |
| 17 | + using int_batch_type = xsimd::batch<int_value_type, arch_type>; |
| 18 | + static constexpr size_t size = B::size; |
| 19 | +- static constexpr size_t nb_input = 8; |
| 20 | ++ static constexpr size_t nb_input = 16; |
| 21 | + static constexpr size_t nb_batches = nb_input / size; |
| 22 | + |
| 23 | + std::array<value_type, nb_input> input; |
| 24 | +@@ -32,14 +32,22 @@ struct rounding_test |
| 25 | + |
| 26 | + rounding_test() |
| 27 | + { |
| 28 | +- input[0] = value_type(-3.5); |
| 29 | +- input[1] = value_type(-2.7); |
| 30 | +- input[2] = value_type(-2.5); |
| 31 | +- input[3] = value_type(-2.3); |
| 32 | +- input[4] = value_type(2.3); |
| 33 | +- input[5] = value_type(2.5); |
| 34 | +- input[6] = value_type(2.7); |
| 35 | +- input[7] = value_type(3.5); |
| 36 | ++ input[0] = value_type(-3.7); |
| 37 | ++ input[1] = value_type(-3.5); |
| 38 | ++ input[2] = value_type(-3.3); |
| 39 | ++ input[3] = value_type(-3.1); |
| 40 | ++ input[4] = value_type(-2.9); |
| 41 | ++ input[5] = value_type(-2.0); |
| 42 | ++ input[6] = value_type(-1.9); |
| 43 | ++ input[7] = value_type(-0.5); |
| 44 | ++ input[8] = value_type(0.5); |
| 45 | ++ input[9] = value_type(1.9); |
| 46 | ++ input[10] = value_type(2.0); |
| 47 | ++ input[11] = value_type(2.9); |
| 48 | ++ input[12] = value_type(3.1); |
| 49 | ++ input[13] = value_type(3.3); |
| 50 | ++ input[14] = value_type(3.5); |
| 51 | ++ input[15] = value_type(3.7); |
| 52 | + } |
| 53 | + |
| 54 | + void test_rounding_functions() |
0 commit comments