[thrust] Fix missing qualifiers for basic_common_reference#9292
Conversation
If a tuple is compatible with `tuple_of_iterator_references` we want to treat it as if it had the same types as the `tuple` However, we need to also consider the qualifiers
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
SummaryThis PR fixes missing cv/ref qualifier handling for cuda::std::basic_common_reference when treating THRUST_NS_QUALIFIER::detail::tuple_of_iterator_references as compatible with cuda::std::tuple. Instead of constructing qualified tuple element types directly, the two partial specializations now delegate to basic_common_reference instantiated on the corresponding unadorned tuple types with the original qualifier helpers. The implementation is simplified and an explanatory comment was added. ChangesFile:
|
| Layer / File(s) | Summary |
|---|---|
basic_common_reference specializations thrust/thrust/iterator/detail/tuple_of_iterator_references.h |
Both basic_common_reference<tuple_of_iterator_references, tuple> and basic_common_reference<tuple, tuple_of_iterator_references> specializations now inherit their type from basic_common_reference<tuple<...>, tuple<...>, _TQual, _UQual> and use unqualified tuple<...> expressions in their enable_if_t conditions. |
Possibly related PRs
- NVIDIA/cccl#9261: Earlier PR modifying the same
basic_common_referencehandling fortuple_of_iterator_referencesandcuda::std::tupletype computation.
Suggested reviewers
- ericniebler
- elstehle
Comment @coderabbitai help to get the list of available commands and usage tips.
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: b359e9d2-15aa-4ab0-b9ed-be3edceb83c0
📒 Files selected for processing (1)
thrust/thrust/iterator/detail/tuple_of_iterator_references.h
🥳 CI Workflow Results🟩 Finished in 2h 23m: Pass: 100%/116 | Total: 4d 03h | Max: 2h 16m | Hits: 28%/705556See results here. |
If a tuple is compatible with
tuple_of_iterator_referenceswe want to treat it as if it had the same types as thetupleHowever, we need to also consider the qualifiers