Skip to content

Conversation

SergeyKopienko
Copy link
Contributor

@SergeyKopienko SergeyKopienko commented Aug 5, 2025

This PR fixes a compile error in oneDPL's inclusive_scan and exclusive_scan operations when used with reverse iterators that have different source iterator types (issue #2296). The solution enhances iterator equality comparison by implementing sophisticated logic to unwrap base iterators (from std::reverse_iterator only) and compare them instead of comparing adapter iterators directly.

  • Enhanced iterator equality comparison with C++20 concepts support and fallback implementation for complex iterator types
  • Added comprehensive test coverage for reverse iterator scenarios with type conversion in exclusive_scan
  • Removed problematic assertions in USM data transfer utilities that were incompatible with iterator arithmetic

@SergeyKopienko SergeyKopienko added this to the 2022.10.0 milestone Aug 5, 2025
@SergeyKopienko SergeyKopienko requested a review from Copilot August 5, 2025 14:13
Copilot

This comment was marked as outdated.

@SergeyKopienko SergeyKopienko requested a review from akukanov August 5, 2025 14:17
@SergeyKopienko SergeyKopienko force-pushed the dev/skopienko/fix_iterators_comparison_V01 branch from 9b2bb00 to ed58f9c Compare August 5, 2025 14:22
@SergeyKopienko SergeyKopienko requested a review from Copilot August 5, 2025 14:22
Copilot

This comment was marked as outdated.

Copilot

This comment was marked as outdated.

Copilot

This comment was marked as outdated.

@SergeyKopienko SergeyKopienko requested a review from Copilot August 6, 2025 12:32
Copilot

This comment was marked as outdated.

@SergeyKopienko SergeyKopienko force-pushed the dev/skopienko/fix_iterators_comparison_V01 branch from cfaabd7 to f8bfd76 Compare August 6, 2025 13:00
@SergeyKopienko SergeyKopienko force-pushed the dev/skopienko/fix_iterators_comparison_V01 branch from f8bfd76 to a79429a Compare August 6, 2025 13:23
danhoeflinger
danhoeflinger previously approved these changes Aug 14, 2025
Copy link
Contributor

@danhoeflinger danhoeflinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM now

…s.cpp - fix review comment: additional tests
@SergeyKopienko SergeyKopienko force-pushed the dev/skopienko/fix_iterators_comparison_V01 branch from 4310358 to 24c92fe Compare August 19, 2025 09:42
Copy link
Contributor

@danhoeflinger danhoeflinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the testing changes. LGTM

@SergeyKopienko SergeyKopienko merged commit 68433ed into main Aug 19, 2025
19 checks passed
@SergeyKopienko SergeyKopienko deleted the dev/skopienko/fix_iterators_comparison_V01 branch August 19, 2025 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

inclusive_scan and exclusive_scan over reverse iterators with different source iterator types fails to compile
4 participants