Slightly expand testing for cuda::counting_iterator#8338
Merged
Jacobfaib merged 9 commits intoNVIDIA:mainfrom Apr 10, 2026
Merged
Conversation
Contributor
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Contributor
Author
|
/ok to test |
1 similar comment
Contributor
Author
|
/ok to test |
Jacobfaib
commented
Apr 9, 2026
| auto diff = ::std::distance(iter1, iter2); | ||
| static_assert(cuda::std::is_same_v<decltype(diff), cuda::std::iter_difference_t<cuda::counting_iterator<int>>>); | ||
| static_assert(cuda::std::is_same_v<decltype(diff), cuda::std::iter_difference_t<cuda::counting_iterator<T>>>); | ||
| static_assert(noexcept(::std::distance(iter1, iter2))); |
Contributor
Author
Contributor
Author
|
/ok to test |
1 similar comment
Contributor
Author
|
/ok to test |
miscco
reviewed
Apr 9, 2026
libcudacxx/test/libcudacxx/cuda/iterators/counting_iterator/compare.pass.cpp
Outdated
Show resolved
Hide resolved
libcudacxx/test/libcudacxx/cuda/iterators/counting_iterator/ctor.default.pass.cpp
Outdated
Show resolved
Hide resolved
libcudacxx/test/libcudacxx/cuda/iterators/counting_iterator/ctor.default.pass.cpp
Outdated
Show resolved
Hide resolved
libcudacxx/test/libcudacxx/cuda/iterators/counting_iterator/ctor.default.pass.cpp
Outdated
Show resolved
Hide resolved
libcudacxx/test/libcudacxx/cuda/iterators/counting_iterator/ctor.value.pass.cpp
Outdated
Show resolved
Hide resolved
libcudacxx/test/libcudacxx/cuda/iterators/counting_iterator/ctor.value.pass.cpp
Outdated
Show resolved
Hide resolved
libcudacxx/test/libcudacxx/cuda/iterators/counting_iterator/decrement.pass.cpp
Outdated
Show resolved
Hide resolved
libcudacxx/test/libcudacxx/cuda/iterators/counting_iterator/host_stl.pass.cpp
Outdated
Show resolved
Hide resolved
Contributor
Author
|
/ok to test |
5fa4691 to
7dfde3f
Compare
Contributor
Author
|
/ok to test |
Contributor
Author
|
/ok to test |
Contributor
Author
|
/ok to test |
Contributor
Author
|
/ok to test |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
cuda::counting_iterator
This comment has been minimized.
This comment has been minimized.
miscco
reviewed
Apr 10, 2026
libcudacxx/test/libcudacxx/cuda/iterators/counting_iterator/compare.pass.cpp
Outdated
Show resolved
Hide resolved
Contributor
🥳 CI Workflow Results🟩 Finished in 27m 48s: Pass: 100%/65 | Total: 10h 38m | Max: 27m 47s | Hits: 99%/257404See results here. |
wmaxey
approved these changes
Apr 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Extract out support for non-integral types from #5963Slightly expand testing forcuda::counting_iterator. Per offline discussion it was decided that we don't really want to support non-integral types in iterators. Having an iterator whereit + 5is not the same as++it... x5is a very easy footgun. Users can approximate the same effect by doingtransform_iterator{counting_iterator, cast_to<float>}if they really want this.Checklist