Skip to content

clang-format on sparse tests #973

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 2, 2025
Merged

clang-format on sparse tests #973

merged 1 commit into from
Jun 2, 2025

Conversation

aartbik
Copy link
Collaborator

@aartbik aartbik commented May 31, 2025

No description provided.

@aartbik aartbik requested review from cliffburdick and Copilot May 31, 2025 00:47
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 A can 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 B with 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 idxi and idxj are 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;
@cliffburdick
Copy link
Collaborator

/build

2 similar comments
@cliffburdick
Copy link
Collaborator

/build

@cliffburdick
Copy link
Collaborator

/build

@cliffburdick cliffburdick merged commit cdddf43 into NVIDIA:main Jun 2, 2025
1 check was pending
@cliffburdick cliffburdick deleted the bok branch June 2, 2025 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants