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: add blas/base/grot #2195

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

performant23
Copy link
Contributor

@performant23 performant23 commented Apr 21, 2024

If applied, this commit will add the package blas/base/grot

Description

What is the purpose of this pull request?

Add the package, blas/base/grot which serves as a generic JavaScript interface to handle array types such as numeric arrays and accessor arrays.

Related Issues

Does this pull request have any related issues?

This pull request:

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.

  1. Use of eslint-disable-line no-underscore-dangle: This is used since we return the data buffer in case of an input accessor array.

  2. We are typecasting input arrays to accessor arrays while passing it to the grot function e.g.

x = xbuf.slice();
y = ybuf.slice();
out = grot( N[ i ], toAccessorArray( x ), 1, toAccessorArray( y ), 1, 0.8, 0.6 ); // eslint-disable-line max-len

Please do let me know in case it is preferred to cast it before it is passed as an argument e.g.

x = toAccessorArray( xbuf.slice() );
y = toAccessorArray( ybuf.slice() );
out = grot( N[ i ], x, 1, y, 1, 0.8, 0.6 ); // eslint-disable-line max-len
  1. In accessor array implementation, we're using @stdlib/complex/dtype to find out the dtype of the input arrays and then conditionally setting it as a param for @stdlib/complex/cmplx.

  2. Also, accessor array implementation works on one index at a time from each array similar to numeric array implementation but the complex array implementation works on 2 indexes from each array at a time since they're stored in pairs.

  3. Tests pertaining to accessor arrays are bifurcated to numeric array tests, accessor array (complex) tests, and accessor array (real) tests.

  4. Also, tests pertaining to accessor arrays testing if it applies plane rotation correctly have headings like :
    tape( '...(sx=1, sy=1) (accessors - complex)', ..... I'm not sure whether using parenthesis after parenthesis is the correct way.

Checklist

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


@stdlib-js/reviewers

If applied, this commit will add the package `blas/base/grot`
@stdlib-bot stdlib-bot added the BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS). label Apr 21, 2024
@kgryte kgryte added the Feature Issue or pull request for adding a new feature. label Apr 25, 2024
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFC]: add blas/base/grot
3 participants