Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support negative strides for idamax and isamax #2793

Merged
merged 3 commits into from
Aug 15, 2024

Conversation

Pranavchiku
Copy link
Member

Resolves #2792. Towards #2464.

Description

What is the purpose of this pull request?

This pull request enhances existing JS ndarray implementation of blas/base/idamax and blas/base/isamax to support negative strides.

Related Issues

Does this pull request have any related issues?

NA

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.


@stdlib-js/reviewers

@Pranavchiku Pranavchiku added Enhancement Issue or pull request for enhancing existing functionality. BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS). Base Issue or pull requests related to "low-level" functionality oriented toward library consumers. JavaScript Issue involves or relates to JavaScript. labels Aug 15, 2024
@Pranavchiku Pranavchiku marked this pull request as ready for review August 15, 2024 07:06
Copy link
Member

@kgryte kgryte left a comment

Choose a reason for hiding this comment

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

@Pranavchiku We also need to update the ndarray.native.js bindings. We shouldn't have divergent behavior if the implementation is JS or via a native add-on. The change to ndarray.native.js is straightforward, and we need to update the tests accordingly.

@Pranavchiku Pranavchiku marked this pull request as draft August 15, 2024 07:17
@Pranavchiku Pranavchiku changed the title refactor: support negative strides for idamax and isamax feat: support negative strides for idamax and isamax Aug 15, 2024
@Pranavchiku Pranavchiku marked this pull request as ready for review August 15, 2024 08:21
Copy link
Member

@kgryte kgryte left a comment

Choose a reason for hiding this comment

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

@Pranavchiku Looks good. Only small change is that the notes in the README need to be updated. Namely,

-   If `N < 1`, both functions return `-1`.

...and in the REPL text file.

@Pranavchiku
Copy link
Member Author

Done, this PR can have a final review.

Copy link
Member

@kgryte kgryte left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks, @Pranavchiku!

@kgryte kgryte merged commit 35cbdfb into stdlib-js:develop Aug 15, 2024
9 checks passed
gunjjoshi pushed a commit to gunjjoshi/stdlib that referenced this pull request Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Base Issue or pull requests related to "low-level" functionality oriented toward library consumers. BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS). Enhancement Issue or pull request for enhancing existing functionality. JavaScript Issue involves or relates to JavaScript.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

idamax.ndarray does not support negative strides
2 participants