Commit cc958dc
committed
math_brute_force: Refactor input generation & reduce default test size
This patch addresses execution time and input coverage in the
math_brute_force tests by centralizing input generation and scaling
down the default number of tested values.
Key changes:
* Abstracted input generation: Replaced duplicated array-filling logic
across test files with shared `fill*Input` helper functions (for unary,
binary, and ternary operations). This ensures that special edge-case
values (NaNs, Infs, denormals) and random payloads are consistently
injected across all tests.
* Reduced default test size: The default loop bounds have been reduced
from an exhaustive `1ULL << 32` values to a randomized subset of
`1ULL << 27` inputs. This drastically speeds up standard test runs.
* Added exhaustive `-a` flag: Introduced a new `-a` command-line option
that restores the exhaustive testing behavior, allowing validation
against all 2^32 sequential values when needed.
* Improved wimpy mode scaling: Removed the `scale` and `step` skip logic,
which could inadvertently skip combinations of special values. Instead,
the patch now directly reduces the total `input_count_power_of_two` by
using a De Bruijn sequence bit-hack to calculate the `log2` of the
`wimpyReductionFactor`.
Fixes: #26691 parent b559ccf commit cc958dc
43 files changed
Lines changed: 444 additions & 1201 deletions
File tree
- test_conformance/math_brute_force
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | 53 | | |
58 | 54 | | |
59 | 55 | | |
| |||
74 | 70 | | |
75 | 71 | | |
76 | 72 | | |
77 | | - | |
| 73 | + | |
78 | 74 | | |
79 | 75 | | |
80 | 76 | | |
| |||
118 | 114 | | |
119 | 115 | | |
120 | 116 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
| 117 | + | |
| 118 | + | |
157 | 119 | | |
158 | 120 | | |
159 | 121 | | |
| |||
433 | 395 | | |
434 | 396 | | |
435 | 397 | | |
436 | | - | |
| 398 | + | |
437 | 399 | | |
438 | | - | |
439 | | - | |
| 400 | + | |
440 | 401 | | |
441 | 402 | | |
442 | 403 | | |
| |||
464 | 425 | | |
465 | 426 | | |
466 | 427 | | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
| 428 | + | |
| 429 | + | |
479 | 430 | | |
480 | 431 | | |
481 | 432 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | 53 | | |
58 | 54 | | |
59 | 55 | | |
| |||
74 | 70 | | |
75 | 71 | | |
76 | 72 | | |
77 | | - | |
| 73 | + | |
78 | 74 | | |
79 | 75 | | |
80 | 76 | | |
| |||
130 | 126 | | |
131 | 127 | | |
132 | 128 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
| 129 | + | |
170 | 130 | | |
171 | 131 | | |
172 | 132 | | |
| |||
595 | 555 | | |
596 | 556 | | |
597 | 557 | | |
598 | | - | |
| 558 | + | |
599 | 559 | | |
600 | | - | |
601 | | - | |
| 560 | + | |
602 | 561 | | |
603 | 562 | | |
604 | 563 | | |
| |||
626 | 585 | | |
627 | 586 | | |
628 | 587 | | |
629 | | - | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
| 588 | + | |
| 589 | + | |
641 | 590 | | |
642 | 591 | | |
643 | 592 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | 53 | | |
58 | 54 | | |
59 | 55 | | |
| |||
74 | 70 | | |
75 | 71 | | |
76 | 72 | | |
77 | | - | |
| 73 | + | |
78 | 74 | | |
79 | 75 | | |
80 | 76 | | |
| |||
122 | 118 | | |
123 | 119 | | |
124 | 120 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
| 121 | + | |
158 | 122 | | |
159 | 123 | | |
160 | 124 | | |
| |||
582 | 546 | | |
583 | 547 | | |
584 | 548 | | |
585 | | - | |
| 549 | + | |
586 | 550 | | |
587 | | - | |
588 | | - | |
| 551 | + | |
589 | 552 | | |
590 | 553 | | |
591 | 554 | | |
| |||
614 | 577 | | |
615 | 578 | | |
616 | 579 | | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
627 | | - | |
628 | | - | |
| 580 | + | |
| 581 | + | |
629 | 582 | | |
630 | 583 | | |
631 | 584 | | |
| |||
0 commit comments