Repository navigation
fix: advance indices in unrolled loops of portable dcopy and scopy - #16122
Planeshifter merged 1 commit into
Conversation
Resolves: stdlib-js#15823 Signed-off-by: Mantra Patel <patelmantra551@gmail.com>
|
Hello! Thank you for your contribution to stdlib. We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:
This acknowledgment confirms that you've read the guidelines, which include:
We can't review or accept contributions without this acknowledgment. Thank you for your understanding and cooperation. We look forward to reviewing your contribution! |
Coverage Report
The above coverage report was generated for the changes in this PR. |
Planeshifter
left a comment
There was a problem hiding this comment.
Thank you for this bug fix!
Description
This PR fixes a unit-stride loop bug in the portable C implementations of
blas/base/dcopyandblas/base/scopy. The unrolled loop copies seven elements per pass but did not advanceixandiy, so copies spanning multiple blocks repeated the first block and left later destination elements unchanged.The loop now advances both indices by
Mafter each pass. Regression tests cover lengths 14, 15, 16, 21, and 28 with non-zero offsets in both packages.Related issue
Resolves #15823.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Testing
-std=c99 -Wall -Wextra -Werror -O2; the direct harness passed for lengths 1 through 150 with non-zero offsets.node-gypare not installed here.On Linux and macOS, the native addon uses the Fortran implementation, so those builds do not exercise the portable C code changed here.