clang-format on sparse tests#973
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR applies clang-format to reflow and split long lines in sparse test files for improved code formatting consistency.
- Reformats license header comments to wrap at consistent column widths.
- Splits chained matrix and tensor assignments from multi-statement lines into individual lines.
- Adjusts function and templated class definitions to one-line definitions.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/00_sparse/Solve.cu | Expanded chained A, E, Y assignments into separate lines for clarity. |
| test/00_sparse/Matvec.cu | Reformatted SetUp and template declarations; split CSR/CSC factory calls. |
| test/00_sparse/Matmul.cu | Expanded chained B, E assignments; one-line SetUp and template defs. |
| test/00_sparse/Convert.cu | Reformatted license header; one-line SetUp and CSR/CSC calls. |
| test/00_sparse/Basic.cu | Expanded COO/CSR/CSC index assignments into separate lines. |
Comments suppressed due to low confidence (3)
test/00_sparse/Solve.cu:80
- [nitpick] Repeated element-by-element assignments for matrix
Acan be condensed. Consider using a loop over indices or a helper function to initialize these values to reduce duplication and improve readability.
A(0, 0) = static_cast<TestType>(1);
test/00_sparse/Matmul.cu:73
- [nitpick] Initializing
Bwith repetitive scalar assignments is verbose. Consider populating the tensor in a loop or using an initializer list to streamline the setup code.
B(0, 0) = static_cast<T>(1);
test/00_sparse/Basic.cu:74
- [nitpick] The COO index arrays
idxiandidxjare assigned element-by-element. To reduce boilerplate, consider initializing these arrays using a loop or by passing an initializer list if supported.
idxi(0) = 0;
Collaborator
|
/build |
2 similar comments
Collaborator
|
/build |
Collaborator
|
/build |
cliffburdick
approved these changes
Jun 2, 2025
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.
No description provided.