Skip to content

fix: correct bugs and typos in blas/base/cgemv#12192

Merged
kgryte merged 2 commits into
developfrom
philipp/fix-commit-review-2026-05-18
May 19, 2026
Merged

fix: correct bugs and typos in blas/base/cgemv#12192
kgryte merged 2 commits into
developfrom
philipp/fix-commit-review-2026-05-18

Conversation

@Planeshifter
Copy link
Copy Markdown
Member

Description

Follow-up fixes for commits merged to develop between 2026-05-17 14:08:37 -0700 and 2026-05-18 04:45:04 -0700 (39 commits, fbf2d918..adb3e6a9b).

All validated issues originate from 2a0b1a1 (feat: add C implementation for blas/base/cgemv).

blas/base/cgemv

Bug fixes (8b47c41):

  • Fix c_cgemv_ndarray incorrectly passing alpha instead of zero to stdlib_strided_cfill_ndarray during the beta == 0 pre-scaling branch (2a0b1a1, lib/node_modules/@stdlib/blas/base/cgemv/src/cgemv_ndarray.c, line ~116), causing all beta = 0 calls to return alpha + alpha*A*X rather than alpha*A*X; sibling sgemv_ndarray.c/dgemv_ndarray.c handle this correctly.
  • Fix leading-dimension validation in c_cgemv (2a0b1a1, lib/node_modules/@stdlib/blas/base/cgemv/src/cgemv.c, line ~91): the guard LDA < v fails to catch an invalid LDA when M/N is zero because it tests the raw dimension rather than vala = max(1, v), which is computed precisely for this purpose and is already cited in the accompanying xerbla message; changed to LDA < vala, consistent with the sibling sgemv.c and dgemv.c implementations.

Typo fixes (2dbfbfc):

  • Fix typo in c_cgemv_ndarray doc comment (2a0b1a1, lib/node_modules/@stdlib/blas/base/cgemv/src/cgemv_ndarray.c:40): duplicate @param strideA1 entry renamed to @param strideA2 to match the function signature.
  • Fix typo in xerbla error messages in cgemv.c and cgemv_ndarray.c (2a0b1a1): dropped the erroneous article "a" from four "must be a nonzero" strings to match the phrasing in sibling sgemv.c/dgemv.c.
  • Fix word-order typo in blas/base/cgemv docs (2a0b1a1): lib/node_modules/@stdlib/blas/base/cgemv/README.md line 295 described c_cgemv_ndarray as "using indexing alternative semantics"; corrected to "using alternative indexing semantics" to match every other occurrence in the README and the C sources.

Related Issues

No.

Questions

No.

Other

Review scope. Audited all 39 commits merged to develop in the 24-hour window (fbf2d918..adb3e6a9b) — roughly 14k insertions across 390 files: four new ndarray packages (trues, falses, trues-like, falses-like), the new blas/base/cgemv C implementation, two large benchmark string-interpolation refactors, and assorted docs/test/style commits.

Style-guide compliance + bug scan. Validated five high-signal issues — two runtime bugs and three typos, all in blas/base/cgemv (2a0b1a1). Each was independently re-verified by re-reading the diff and comparing against the established sgemv/dgemv reference implementations.

Checked, no action required:

  • Benchmark string-interpolation refactors (d660241, 9451399) and the "fix missing arguments" commits (d400b65, 8e2d42f): format() placeholder/argument counts verified to match.
  • New trues/falses/trues-like/falses-like packages: implementations fill the correct boolean value; READMEs, REPL help, and TypeScript declarations are consistent with the code.
  • cgemv complex arithmetic, stride/offset handling, and addon argument parsing: verified correct.

Deliberately excluded (require interpretation; no explicit backing rule):

  • Missing space inside two if conditions, and @return annotations on void functions, in the cgemv C sources — docs/style-guides/c is a stub, so neither is an explicit style-guide violation.
  • A package.json keyword-list inconsistency between trues/falses and their *-like siblings — cosmetic, not a defect.

Checklist

AI Assistance

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

This PR was authored by Claude Code. An automated multi-agent review audited every commit merged to develop over the preceding 24 hours; each finding was cross-verified against the diff and the sgemv/dgemv reference implementations before any change was applied. All fixes are mechanical corrections scoped to the reviewed window.



Generated by Claude Code

claude added 2 commits May 18, 2026 12:37
When `beta` is zero, `c_cgemv_ndarray` filled `Y` with `alpha` instead of
`zero`, so callers passing `beta = 0` received `alpha + alpha*A*X` rather
than `alpha*A*X`. The `c_cgemv` leading dimension check also compared
`LDA` against `v` instead of `vala` (`max(1,v)`), so an invalid `LDA`
went unreported when `M`/`N` is zero. Both defects were introduced in
2a0b1a1.

https://claude.ai/code/session_01TSEHKgS4iExWRieEZUJTbw
Correct a duplicated `@param strideA1` doc-comment entry that should be
`strideA2`, drop the spurious article in four "must be a nonzero" error
messages, and fix transposed wording in the `c_cgemv_ndarray` README
description ("indexing alternative" -> "alternative indexing"). Typos
introduced in 2a0b1a1.

https://claude.ai/code/session_01TSEHKgS4iExWRieEZUJTbw
@stdlib-bot stdlib-bot added the BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS). label May 18, 2026
@stdlib-bot
Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
blas/base/cgemv $\color{green}845/845$
$\color{green}+100.00%$
$\color{green}118/118$
$\color{green}+100.00%$
$\color{green}6/6$
$\color{green}+100.00%$
$\color{green}845/845$
$\color{green}+100.00%$

The above coverage report was generated for the changes in this PR.

@kgryte kgryte marked this pull request as ready for review May 19, 2026 05:54
@kgryte kgryte requested a review from a team May 19, 2026 05:54
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label May 19, 2026
@kgryte
Copy link
Copy Markdown
Member

kgryte commented May 19, 2026

cc @DivitJain26 as this was relevant for your recent work.

@kgryte kgryte removed the Needs Review A pull request which needs code review. label May 19, 2026
@kgryte kgryte merged commit c606f03 into develop May 19, 2026
55 checks passed
@kgryte kgryte deleted the philipp/fix-commit-review-2026-05-18 branch May 19, 2026 05:56
@DivitJain26
Copy link
Copy Markdown
Member

cc @DivitJain26 as this was relevant for your recent work.

I will keep this in mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants