You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.".
I consulted an AI assistant to help structure and generate the test files (test.main.js, test.native.js) and benchmark files required to test the native C addon. The core logic and implementation were authored manually by myself.
@stdlib-js/reviewers
stdlib-bot
added
the
BLAS
Issue or pull request related to Basic Linear Algebra Subprograms (BLAS).
label
Aug 31, 2026
Hi @ujjwalv01, I was curious on your take on this package so I went ahead and took a look at the PR. I noticed you opted to pass k as a scalar in favour of keeping dtype as generic. While we can’t say what the correct approach is until @kgryte has a look at #14471, I think the conversation there can be of help for future reference. Hope it’s of some use.
@Arjan-P , Thanks for taking a look and for the pointer to #14471 , It’s definitely helpful to see the discussion there.
My main reasoning for extracting k to a scalar in JS was to easily handle generic dtypes without complicating the C addon. If k is a generic 0D ndarray, its underlying buffer is a standard JS array. By using ndarraylike2scalar in JS, we can extract the primitive value regardless of the dtype, pass it as a simple int64 to the C addon, and then just wrap it back into a native INT64 ndarray on the C side to satisfy the core C API.
It felt like a clean way to keep the JS interface flexible (supporting generic arrays) while keeping the N-API bindings simple. But I'll definitely keep an eye on how it gets resolved in #14471 so I can align with whatever approach preferred for the project. Thanks again;
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
BLASIssue or pull request related to Basic Linear Algebra Subprograms (BLAS).
4 participants
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.
Resolves a part of #14819
Description
This pull request:
dtril).test.js,test.main.js,test.native.js) and benchmarks to cover and utilize the new native C addon.Related Issues
This pull request has the following related issues:
Questions
No.
Other
No.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
I consulted an AI assistant to help structure and generate the test files (
test.main.js,test.native.js) and benchmark files required to test the native C addon. The core logic and implementation were authored manually by myself.@stdlib-js/reviewers