[libcu++] Specialize cuda::std::formatter for tuple#9593
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
Added tuple/pair formatting support to Key changes:
WalkthroughAdds tuple and pair formatting support in libcudacxx, including formatter plumbing, a retarget buffer/context path, tuple formatter specializations, and tests for format, parse, bracket, separator, format_to, and vformat_to behavior. ChangesTuple formatting support
Suggested labels
Suggested reviewers
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
libcudacxx/include/cuda/std/__format/formatters/tuple.h (1)
10-11: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winsuggestion: Fix the include guard spelling to match the full path.
FORMATERSis missing aT; this violates the project’s full-path include-guard rule.-#ifndef _CUDA_STD___FORMAT_FORMATERS_TUPLE_H -#define _CUDA_STD___FORMAT_FORMATERS_TUPLE_H +#ifndef _CUDA_STD___FORMAT_FORMATTERS_TUPLE_H +#define _CUDA_STD___FORMAT_FORMATTERS_TUPLE_H ... -#endif // _CUDA_STD___FORMAT_FORMATERS_TUPLE_H +#endif // _CUDA_STD___FORMAT_FORMATTERS_TUPLE_HAs per coding guidelines, “Headers must use include guards named from the uppercase full path.”
Also applies to: 207-207
Source: Coding guidelines
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: fa5bfd9d-0946-4920-9049-d87f3bd28a13
📒 Files selected for processing (20)
libcudacxx/include/cuda/std/__format/buffer.hlibcudacxx/include/cuda/std/__format/format_context.hlibcudacxx/include/cuda/std/__format/format_spec_parser.hlibcudacxx/include/cuda/std/__format/formatter.hlibcudacxx/include/cuda/std/__format/formatters/tuple.hlibcudacxx/include/cuda/std/__format_libcudacxx/include/cuda/std/__fwd/format.hlibcudacxx/include/cuda/std/__string/literal.hlibcudacxx/test/libcudacxx/std/text/format/format.functions/checkers/format_to.hlibcudacxx/test/libcudacxx/std/text/format/format.functions/checkers/format_to_n.hlibcudacxx/test/libcudacxx/std/text/format/format.functions/checkers/vformat_to.hlibcudacxx/test/libcudacxx/std/text/format/format.functions/format_to.tuple.pass.cpplibcudacxx/test/libcudacxx/std/text/format/format.functions/tests/tuple.hlibcudacxx/test/libcudacxx/std/text/format/format.functions/vformat_to.tuple.pass.cpplibcudacxx/test/libcudacxx/std/text/format/format.tuple/format.pass.cpplibcudacxx/test/libcudacxx/std/text/format/format.tuple/parse.pass.cpplibcudacxx/test/libcudacxx/std/text/format/format.tuple/set_brackets.pass.cpplibcudacxx/test/libcudacxx/std/text/format/format.tuple/set_separator.pass.cpplibcudacxx/test/support/format_functions_common.hlibcudacxx/test/support/literal.h
856f4d6 to
f378167
Compare
| } | ||
| else | ||
| { | ||
| ::cuda::std::__throw_format_error("Type m requires a pair or a tuple with two elements"); |
There was a problem hiding this comment.
Should this reference "tuple presentation types"?
This comment has been minimized.
This comment has been minimized.
e335053 to
1d22f09
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: f60d3e52-ac80-4fda-a4f1-bb32c1417520
📒 Files selected for processing (22)
libcudacxx/include/cuda/std/__format/buffer.hlibcudacxx/include/cuda/std/__format/format_context.hlibcudacxx/include/cuda/std/__format/format_spec_parser.hlibcudacxx/include/cuda/std/__format/formatter.hlibcudacxx/include/cuda/std/__format/formatters/tuple.hlibcudacxx/include/cuda/std/__format/output_utils.hlibcudacxx/include/cuda/std/__format_libcudacxx/include/cuda/std/__fwd/format.hlibcudacxx/include/cuda/std/__string/literal.hlibcudacxx/test/libcudacxx/libcxx/literals/str.pass.cpplibcudacxx/test/libcudacxx/std/text/format/format.functions/checkers/format_to.hlibcudacxx/test/libcudacxx/std/text/format/format.functions/checkers/format_to_n.hlibcudacxx/test/libcudacxx/std/text/format/format.functions/checkers/vformat_to.hlibcudacxx/test/libcudacxx/std/text/format/format.functions/format_to.tuple.pass.cpplibcudacxx/test/libcudacxx/std/text/format/format.functions/tests/tuple.hlibcudacxx/test/libcudacxx/std/text/format/format.functions/vformat_to.tuple.pass.cpplibcudacxx/test/libcudacxx/std/text/format/format.tuple/format.pass.cpplibcudacxx/test/libcudacxx/std/text/format/format.tuple/parse.pass.cpplibcudacxx/test/libcudacxx/std/text/format/format.tuple/set_brackets.pass.cpplibcudacxx/test/libcudacxx/std/text/format/format.tuple/set_separator.pass.cpplibcudacxx/test/support/format_functions_common.hlibcudacxx/test/support/literal.h
✅ Files skipped from review due to trivial changes (4)
- libcudacxx/test/libcudacxx/std/text/format/format.functions/checkers/format_to_n.h
- libcudacxx/include/cuda/std/_format
- libcudacxx/test/libcudacxx/std/text/format/format.functions/format_to.tuple.pass.cpp
- libcudacxx/include/cuda/std/__fwd/format.h
🚧 Files skipped from review as they are similar to previous changes (12)
- libcudacxx/test/libcudacxx/std/text/format/format.functions/vformat_to.tuple.pass.cpp
- libcudacxx/include/cuda/std/__string/literal.h
- libcudacxx/test/libcudacxx/std/text/format/format.functions/checkers/vformat_to.h
- libcudacxx/test/support/format_functions_common.h
- libcudacxx/include/cuda/std/__format/format_spec_parser.h
- libcudacxx/test/libcudacxx/std/text/format/format.functions/checkers/format_to.h
- libcudacxx/test/support/literal.h
- libcudacxx/include/cuda/std/__format/formatter.h
- libcudacxx/include/cuda/std/__format/buffer.h
- libcudacxx/include/cuda/std/__format/formatters/tuple.h
- libcudacxx/include/cuda/std/__format/format_context.h
- libcudacxx/test/libcudacxx/std/text/format/format.functions/tests/tuple.h
😬 CI Workflow Results🟥 Finished in 1h 49m: Pass: 80%/120 | Total: 3d 07h | Max: 1h 48m | Hits: 54%/607498See results here. |
This PR implements: