Commit 426ac05
committed
algorithms: expose Proj parameter in min/max/minmax, is_sorted, and is_partitioned CPOs
This commit expands projection support to several core parallel algorithms, bringing them into alignment with the std::ranges design and the hpx::ranges container algorithms.
Key changes:
- Exposed 'Proj' template parameter (defaulting to hpx::identity) in public CPOs for hpx::min_element, hpx::max_element, hpx::minmax_element, hpx::is_sorted, hpx::is_sorted_until, and hpx::is_partitioned.
- Integrated hpx::parallel::traits::is_projected_v and hpx::parallel::traits::is_indirect_callable_v constraints for standard-compliant type validation.
- Fixed a regression in element_type deduction in the parallel reduction path (sequential_minmax_element_ind) to correctly handle projected values.
- Cleaned up source headers and removed non-ASCII characters to satisfy 'inspect' CI checks.
- Added comprehensive regression tests for both parallel and container-based overloads of these algorithms.1 parent 37c665c commit 426ac05
11 files changed
Lines changed: 838 additions & 74 deletions
File tree
- libs/core/algorithms
- include/hpx/parallel/algorithms
- tests/unit
- algorithms
- container_algorithms
Lines changed: 21 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
| 258 | + | |
| 259 | + | |
259 | 260 | | |
260 | 261 | | |
261 | | - | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
262 | 268 | | |
263 | 269 | | |
264 | | - | |
265 | | - | |
| 270 | + | |
| 271 | + | |
266 | 272 | | |
267 | 273 | | |
268 | 274 | | |
269 | | - | |
| 275 | + | |
270 | 276 | | |
271 | 277 | | |
272 | | - | |
| 278 | + | |
| 279 | + | |
273 | 280 | | |
274 | 281 | | |
275 | 282 | | |
276 | | - | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
277 | 288 | | |
278 | 289 | | |
279 | 290 | | |
280 | | - | |
| 291 | + | |
| 292 | + | |
281 | 293 | | |
282 | 294 | | |
283 | 295 | | |
284 | | - | |
| 296 | + | |
285 | 297 | | |
286 | 298 | | |
287 | 299 | | |
| |||
Lines changed: 37 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
462 | | - | |
| 462 | + | |
| 463 | + | |
463 | 464 | | |
464 | 465 | | |
465 | 466 | | |
466 | | - | |
467 | | - | |
468 | | - | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
469 | 472 | | |
470 | 473 | | |
471 | 474 | | |
472 | | - | |
473 | | - | |
| 475 | + | |
| 476 | + | |
474 | 477 | | |
475 | 478 | | |
476 | 479 | | |
477 | | - | |
| 480 | + | |
478 | 481 | | |
479 | 482 | | |
480 | 483 | | |
481 | | - | |
| 484 | + | |
| 485 | + | |
482 | 486 | | |
483 | 487 | | |
484 | 488 | | |
485 | 489 | | |
486 | | - | |
487 | | - | |
488 | | - | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
489 | 494 | | |
490 | 495 | | |
491 | 496 | | |
492 | 497 | | |
493 | | - | |
| 498 | + | |
| 499 | + | |
494 | 500 | | |
495 | 501 | | |
496 | 502 | | |
497 | | - | |
| 503 | + | |
498 | 504 | | |
499 | 505 | | |
500 | 506 | | |
501 | 507 | | |
502 | 508 | | |
503 | 509 | | |
504 | 510 | | |
505 | | - | |
| 511 | + | |
| 512 | + | |
506 | 513 | | |
507 | 514 | | |
508 | 515 | | |
509 | | - | |
510 | | - | |
511 | | - | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
512 | 521 | | |
513 | 522 | | |
514 | 523 | | |
515 | 524 | | |
516 | | - | |
| 525 | + | |
517 | 526 | | |
518 | 527 | | |
519 | 528 | | |
520 | | - | |
| 529 | + | |
521 | 530 | | |
522 | 531 | | |
523 | 532 | | |
524 | | - | |
| 533 | + | |
| 534 | + | |
525 | 535 | | |
526 | 536 | | |
527 | 537 | | |
528 | 538 | | |
529 | | - | |
530 | | - | |
531 | | - | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
532 | 543 | | |
533 | 544 | | |
534 | 545 | | |
535 | 546 | | |
536 | | - | |
| 547 | + | |
| 548 | + | |
537 | 549 | | |
538 | 550 | | |
539 | 551 | | |
540 | | - | |
| 552 | + | |
541 | 553 | | |
542 | 554 | | |
543 | 555 | | |
| |||
0 commit comments