Skip to content

[libcu++] Rework our handling of iterator_category#8849

Merged
miscco merged 2 commits into
NVIDIA:mainfrom
miscco:thrust_iter_category
May 11, 2026
Merged

[libcu++] Rework our handling of iterator_category#8849
miscco merged 2 commits into
NVIDIA:mainfrom
miscco:thrust_iter_category

Conversation

@miscco
Copy link
Copy Markdown
Contributor

@miscco miscco commented May 6, 2026

We often only look for iterator_category to decide whether we can use more efficient implementations.

This does not play well with the C++20 iterators, which often have input_iterator as their iterator_category and the actual information stored in iterator_concept

Consequently we check whether something has iterator_concept defined and if so we use the higher of iterator_concept and iterator_category

@miscco miscco requested review from a team as code owners May 6, 2026 17:28
@miscco miscco requested a review from Jacobfaib May 6, 2026 17:28
@miscco miscco requested a review from gevtushenko May 6, 2026 17:28
@github-project-automation github-project-automation Bot moved this to Todo in CCCL May 6, 2026
@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Review in CCCL May 6, 2026
Copy link
Copy Markdown
Contributor Author

@miscco miscco left a comment

Choose a reason for hiding this comment

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

Note: I still need to add more tests, but I want to see whether things break first

@miscco miscco force-pushed the thrust_iter_category branch 2 times, most recently from 0199d6c to ed18166 Compare May 6, 2026 17:56
@github-actions

This comment has been minimized.

We often only look for `iterator_category` to decide whether we can use more efficient implementations.

This does not play well with the C++20 iterators, which often have `input_iterator` as their `iterator_category` and the actual information stored in `iterator_concept`

Consequently we check whether something has `iterator_concept` defined and if so we use the higher of `iterator_concept` and `iterator_category`
@miscco miscco force-pushed the thrust_iter_category branch 2 times, most recently from 545980c to b132617 Compare May 7, 2026 07:01
@miscco miscco force-pushed the thrust_iter_category branch from b132617 to 80c7ad5 Compare May 7, 2026 07:53
@github-actions

This comment has been minimized.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

🥳 CI Workflow Results

🟩 Finished in 3h 18m: Pass: 100%/170 | Total: 5d 04h | Max: 2h 30m | Hits: 73%/455417

See results here.

@miscco miscco merged commit c7188c2 into NVIDIA:main May 11, 2026
377 of 380 checks passed
@miscco miscco deleted the thrust_iter_category branch May 11, 2026 06:45
@github-project-automation github-project-automation Bot moved this from In Review to Done in CCCL May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[BUG]: cuda::transform_iterator silently downgrades iterator_category → 2.5–3.3× slowdowns for thrust algorithms that dispatch on it

3 participants