Skip to content

clang-format on sparse tests#973

Merged
cliffburdick merged 1 commit into
NVIDIA:mainfrom
aartbik:bok
Jun 2, 2025
Merged

clang-format on sparse tests#973
cliffburdick merged 1 commit into
NVIDIA:mainfrom
aartbik:bok

Conversation

@aartbik

@aartbik aartbik commented May 31, 2025

Copy link
Copy Markdown
Collaborator

No description provided.

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Collaborator

/build

2 similar comments
@cliffburdick

Copy link
Copy Markdown
Collaborator

/build

@cliffburdick

Copy link
Copy Markdown
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants