Repository navigation
fix: advance indices in unrolled loops of portable dcopy and scopy - #16122
Open
mantrapatel05 wants to merge 1 commit into
Open
mantrapatel05 wants to merge 1 commit into
mantrapatel05 wants to merge 1 commit into
Conversation
Resolves: stdlib-js#15823 Signed-off-by: Mantra Patel <patelmantra551@gmail.com>
Contributor
|
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! |
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
This branch has not been deployed
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.
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.