Skip to content

feat: add blas/ext/base/gwaxpb#13122

Merged
kgryte merged 5 commits into
stdlib-js:developfrom
anandkaranubc:feat/gwaxpb
Jun 25, 2026
Merged

feat: add blas/ext/base/gwaxpb#13122
kgryte merged 5 commits into
stdlib-js:developfrom
anandkaranubc:feat/gwaxpb

Conversation

@anandkaranubc

Copy link
Copy Markdown
Contributor

Resolves stdlib-js/metr-issue-tracker#619

Description

What is the purpose of this pull request?

This pull request:

  • adds blas/ext/base/gwaxpb

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of 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

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution. Example disclosures: "This PR was written primarily by Claude Code." or "I consulted ChatGPT to understand the codebase, but the proposed changes were fully authored manually by myself.".

Used Cursor+VS Code code-generation tools to help assist with the feature.


@stdlib-js/reviewers

---
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_pkg_readmes
    status: passed
  - task: lint_markdown_docs
    status: na
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: passed
  - task: lint_repl_help
    status: passed
  - task: lint_javascript_src
    status: passed
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: passed
  - task: lint_javascript_tests
    status: passed
  - task: lint_javascript_benchmarks
    status: passed
  - 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: passed
  - task: lint_license_headers
    status: passed
---
---
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_pkg_readmes
    status: na
  - task: lint_markdown_docs
    status: na
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: na
  - 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
---
@anandkaranubc anandkaranubc requested a review from a team June 25, 2026 03:38
Comment on lines +24 to +25
var gwapx = require( '@stdlib/blas/ext/base/gwapx' ).ndarray;
var gwax = require( '@stdlib/blas/ext/base/gwax' ).ndarray;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can remove these imports if needed. Added those because the issue description here mentioned to use these packages.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's fine. I know we discussed this during office hours where I was of the mind of only delegating to hardware optimized routines. Apparently, I have flip flopped on this. I'm okay leaving this as is.

// MAIN //

/**
* Multiplies each element in a strided array `x` by a scalar constant and adds a scalar constant before assigning the results to a strided array `w` using alternative indexing semantics.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Description check if this looks good?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is fine. At some point, we may just need to transition to using the equation in the descriptions, rather than explain out everything in words. This is similar to Level 2 and Level 3 BLAS. We're not there, yet, but something to keep in mind that there is a limit to how verbose we need to be. At some point, better to just show rather than describe.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I may ask, what's preventing us to do that at the moment?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing, to be honest, but you've had your pattern going and we are consistent across the various packages you've added, so didn't seem like it was necessary to buck the trend.

@anandkaranubc anandkaranubc added Feature Issue or pull request for adding a new feature. Needs Review A pull request which needs code review. BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS). JavaScript Issue involves or relates to JavaScript. METR Pull request associated with the METR project. labels Jun 25, 2026
@stdlib-bot

stdlib-bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
blas/ext/base/gwaxpb $\\color{green}318/318$
$\\color{green}+0.00\\%$
$\\color{green}28/28$
$\\color{green}+0.00\\%$
$\\color{green}3/3$
$\\color{green}+0.00\\%$
$\\color{green}318/318$
$\\color{green}+0.00\\%$

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

@kgryte kgryte removed the Needs Review A pull request which needs code review. label Jun 25, 2026
Comment thread lib/node_modules/@stdlib/blas/ext/base/gwaxpb/docs/types/index.d.ts Outdated
Comment thread lib/node_modules/@stdlib/blas/ext/base/gwaxpb/docs/types/index.d.ts Outdated
Co-authored-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
Comment thread lib/node_modules/@stdlib/blas/ext/base/gwaxpb/README.md Outdated
Co-authored-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
Comment thread lib/node_modules/@stdlib/blas/ext/base/gwaxpb/README.md Outdated
Co-authored-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
@kgryte kgryte merged commit 73cd853 into stdlib-js:develop Jun 25, 2026
13 checks passed
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). Feature Issue or pull request for adding a new feature. JavaScript Issue involves or relates to JavaScript. METR Pull request associated with the METR project.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFC]: add blas/ext/base/gwaxpb

3 participants