[libcu++] Implement tuple protocol for integer_sequence#9129
Conversation
📝 WalkthroughSummary by CodeRabbit
suggestion: WalkthroughCentralizes structured-bindings-pack detection, updates visit.cuh to use the new predicate, adds tuple-protocol specializations (tuple_size, tuple_element, get) for cuda::std::integer_sequence, bumps the integer_sequence feature-test macro, and adds tests validating tuple-like access and structured bindings. ChangesStructured bindings pack support and tuple protocol
Suggested reviewers
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
libcudacxx/include/cuda/std/__utility/integer_sequence.h (2)
248-248: ⚡ Quick winsuggestion: Fix typo in comment.
"sequnence" → "sequence"
-// specialize cuda::std::tuple_size and cuda::std::tuple_element for cuda::std::integer_sequnence +// specialize cuda::std::tuple_size and cuda::std::tuple_element for cuda::std::integer_sequence
280-280: ⚡ Quick winsuggestion: Fix typo in comment.
"sequnence" → "sequence"
-// tuple protocol for cuda::std::integer_sequnence +// tuple protocol for cuda::std::integer_sequence
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 65b20831-4197-4671-a73f-1ca436bac9df
📒 Files selected for processing (5)
cudax/include/cuda/experimental/__execution/visit.cuhlibcudacxx/include/cuda/std/__cccl/dialect.hlibcudacxx/include/cuda/std/__utility/integer_sequence.hlibcudacxx/include/cuda/std/versionlibcudacxx/test/libcudacxx/std/utilities/intseq/intseq.binding/tuple_interface.pass.cpp
d649c52 to
6fdb61b
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
libcudacxx/test/libcudacxx/std/utilities/intseq/intseq.binding/tuple_interface.pass.cpp (1)
59-64: ⚡ Quick winsuggestion: add a
const auto [cv0, cv1, cv2, cv3] = seq4;case here. The current test only instantiates the non-conststd::tuple_elementpath through structured bindings, so the new const specialization added in the header can still regress without this file noticing.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 36c3fd09-2d49-48bb-b9f1-60fba8c38625
📒 Files selected for processing (5)
cudax/include/cuda/experimental/__execution/visit.cuhlibcudacxx/include/cuda/std/__cccl/dialect.hlibcudacxx/include/cuda/std/__utility/integer_sequence.hlibcudacxx/include/cuda/std/versionlibcudacxx/test/libcudacxx/std/utilities/intseq/intseq.binding/tuple_interface.pass.cpp
😬 CI Workflow Results🟥 Finished in 1h 45m: Pass: 99%/159 | Total: 2d 03h | Max: 1h 44m | Hits: 69%/618936See results here. |
This PR implements tuple protocol for
integer_sequence(P1789R3) from C++26