Skip to content

Make cuda::zip_iterator work with proxy iterators - #7787

Merged
bernhardmgruber merged 2 commits into
NVIDIA:mainfrom
miscco:fix_zip_iterator
Feb 25, 2026
Merged

bernhardmgruber merged 2 commits into
NVIDIA:mainfrom
miscco:fix_zip_iterator

Conversation

@miscco

@miscco miscco commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

We have a lot of proxy iterators that might be valid targets for zip_iterator

However, those conventionally have void as their reference / value_type

In that case, there is no iter_value_t available, so we need to deduce it differently

Fixes #7783

@miscco
miscco requested a review from a team as a code owner February 25, 2026 10:16
@miscco
miscco requested a review from griwes February 25, 2026 10:16
@github-project-automation github-project-automation Bot moved this to Todo in CCCL Feb 25, 2026
@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Review in CCCL Feb 25, 2026
@github-actions

This comment has been minimized.

We have a lot of proxy iterators that might be valid targets for zip_iterator

However, those conventionally have `void` as their `reference` / `value_type`

In that case, there is no `iter_value_t` available, so we need to deduce it differently

Fixes NVIDIA#7783
Comment on lines -94 to -95
_CCCL_REQUIRES(::cuda::std::is_invocable_v<_Fn&, _Index, _Arg> _CCCL_AND(
!::cuda::std::is_same_v<::cuda::std::remove_cvref_t<_Arg>, __tabulate_proxy>))

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This constraint was breaking older NVCC, so I explicitly defaulted the SMF to avoid having to SFINAE it out

@github-actions

Copy link
Copy Markdown
Contributor

🥳 CI Workflow Results

🟩 Finished in 1h 54m: Pass: 100%/99 | Total: 1d 13h | Max: 1h 35m | Hits: 89%/252485

See results here.

@bernhardmgruber
bernhardmgruber merged commit 8f21b2e into NVIDIA:main Feb 25, 2026
115 of 116 checks passed
@github-project-automation github-project-automation Bot moved this from In Review to Done in CCCL Feb 25, 2026
@bdice

bdice commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

I'd like to propose this for a branch/3.3.x backport. Would that be possible?

@miscco
miscco deleted the fix_zip_iterator branch February 26, 2026 06:39
miscco added a commit to miscco/cccl that referenced this pull request Feb 26, 2026
We have a lot of proxy iterators that might be valid targets for zip_iterator

However, those conventionally have `void` as their `reference` / `value_type`

In that case, there is no `iter_value_t` available, so we need to deduce it differently

Fixes NVIDIA#7783
wmaxey added a commit that referenced this pull request Feb 27, 2026
* Overload standard iterator functions for `cuda` iterators (#7738)

* Overload standard iterator functions for `cuda::counting_iterator`

* Overload standard iterator functions for `cuda::zip_iterator`

* Overload standard iterator functions for `cuda::zip_transform_iterator`

* Overload standard iterator functions for `cuda::transform_iterator`

* Overload standard iterator functions for `cuda::transform_output_iterator`

* Overload standard iterator functions for `cuda::transform_input_output_iterator`

* Make `cuda::zip_iterator` work with proxy iterators (#7787)

We have a lot of proxy iterators that might be valid targets for zip_iterator

However, those conventionally have `void` as their `reference` / `value_type`

In that case, there is no `iter_value_t` available, so we need to deduce it differently

Fixes #7783

---------

Co-authored-by: Wesley Maxey <[email protected]>
rapids-bot Bot pushed a commit to rapidsai/rapids-cmake that referenced this pull request Mar 25, 2026
robertmaynard pushed a commit to robertmaynard/rapids-cmake that referenced this pull request Mar 25, 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]: zip_iterator plus cuda::discard_iterator compile issue when used with thrust::inclusive_scan

4 participants