feat: add blas/ext/base/gvander#10934
feat: add blas/ext/base/gvander#10934headlessNode wants to merge 13 commits intostdlib-js:developfrom
blas/ext/base/gvander#10934Conversation
Coverage Report
The above coverage report was generated for the changes in this PR. |
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
- task: lint_filenames
status: passed
- task: lint_editorconfig
status: passed
- task: lint_markdown
status: na
- task: lint_package_json
status: na
- task: lint_repl_help
status: na
- task: lint_javascript_src
status: passed
- task: lint_javascript_cli
status: na
- task: lint_javascript_examples
status: na
- task: lint_javascript_tests
status: passed
- task: lint_javascript_benchmarks
status: na
- task: lint_python
status: na
- task: lint_r
status: na
- task: lint_c_src
status: na
- task: lint_c_examples
status: na
- task: lint_c_benchmarks
status: na
- task: lint_c_tests_fixtures
status: na
- task: lint_shell
status: na
- task: lint_typescript_declarations
status: passed
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---
lib/node_modules/@stdlib/blas/ext/base/gvander/lib/accessors.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/blas/ext/base/gvander/lib/accessors.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/blas/ext/base/gvander/lib/accessors.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/blas/ext/base/gvander/lib/accessors.js
Outdated
Show resolved
Hide resolved
Signed-off-by: Muhammad Haris <101793258+headlessNode@users.noreply.github.com>
Signed-off-by: Muhammad Haris <101793258+headlessNode@users.noreply.github.com>
Signed-off-by: Muhammad Haris <101793258+headlessNode@users.noreply.github.com>
lib/node_modules/@stdlib/blas/ext/base/gvander/lib/accessors.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/blas/ext/base/gvander/lib/accessors.js
Outdated
Show resolved
Hide resolved
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
- task: lint_filenames
status: passed
- task: lint_editorconfig
status: passed
- task: lint_markdown
status: na
- task: lint_package_json
status: na
- task: lint_repl_help
status: na
- task: lint_javascript_src
status: passed
- task: lint_javascript_cli
status: na
- task: lint_javascript_examples
status: na
- task: lint_javascript_tests
status: na
- task: lint_javascript_benchmarks
status: na
- task: lint_python
status: na
- task: lint_r
status: na
- task: lint_c_src
status: na
- task: lint_c_examples
status: na
- task: lint_c_benchmarks
status: na
- task: lint_c_tests_fixtures
status: na
- task: lint_shell
status: na
- task: lint_typescript_declarations
status: passed
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---
Signed-off-by: Athan <kgryte@gmail.com>
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Athan <kgryte@gmail.com>
| io = offsetOut + ( i1*strideOut2 ); | ||
| ix = offsetX; | ||
| for ( i0 = 0; i0 < S0; i0++ ) { | ||
| out[ io ] = out[ io+strideOut2 ] * x[ ix ]; | ||
| ix += sx; | ||
| io += strideOut1; | ||
| } |
There was a problem hiding this comment.
I think you can improve the cache locality of these loops. Namely, by always walking backward. Right now, you (1) start at the beginning of a column, (2) march to the end, (3) move to the previous column, and (4) repeat. Better would be to start at the end of a column, march to the beginning, and then move to the end of the previous column. When you do it this way, you can use the do# variables and avoid the need for doing multiplication AND addition to compute offsets.
There was a problem hiding this comment.
Doing it as described will then make these loops the exact opposite of the mode > 0 case where, e.g., io -= do0 and io -= do1, etc.
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Athan <kgryte@gmail.com>
| io = offsetOut + ( ( S0-1 ) * strideOut2 ); | ||
| for ( i1 = 0; i1 < S1; i1++ ) { | ||
| out[ io ] = 1.0; | ||
| io -= do0; | ||
| for ( i0 = 1; i0 < S0; i0++ ) { | ||
| out[ io ] = out[ io+do0 ] * x[ ix ]; | ||
| io -= do0; | ||
| } | ||
| ix += sx; | ||
| io += do1; | ||
| } |
There was a problem hiding this comment.
Similar to the comment below. Currently, you are going to the end of a row, working back to the beginning, and then moving to the next row. Better would be start at the end of the last row, work back to the beginning, and move to the end of the previous row.
There was a problem hiding this comment.
Doing it this way should simplify your increment update logic.
There was a problem hiding this comment.
All relevant changes to base.js will need to be propagated here.
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Athan <kgryte@gmail.com>
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Athan <kgryte@gmail.com>
kgryte
left a comment
There was a problem hiding this comment.
Left another round of comments.
|
For METR, |
Resolves stdlib-js/metr-issue-tracker#197.
Description
This pull request:
blas/ext/base/gvanderRelated Issues
This pull request has the following related issues:
blas/ext/base/gvandermetr-issue-tracker#197Questions
No.
Other
No.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
Primarily written by Claude Code.
@stdlib-js/reviewers