-
-
Notifications
You must be signed in to change notification settings - Fork 587
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 C ndarray
API and refactor blas/ext/base/sapx
#4696
base: develop
Are you sure you want to change the base?
Conversation
--- 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: passed - 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: na - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: missing_dependencies - task: lint_c_examples status: missing_dependencies - task: lint_c_benchmarks status: missing_dependencies - 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 --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na ---
Coverage Report
The above coverage report was generated for the changes in this PR. |
```javascript | ||
var Float32Array = require( '@stdlib/array/float32' ); | ||
|
||
var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] ); | ||
|
||
sapx.ndarray( 3, 5.0, x, 1, x.length-3 ); | ||
// x => <Float32Array>[ 1.0, -2.0, 3.0, 1.0, 10.0, -1.0 ] | ||
// x => <Float32Array>[ 6.0, 3.0, 8.0, -4.0, 5.0, -6.0 ] | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kgryte Here I was getting a lint error which prevented me from pushing. I made this change to be able to push the commit.
I tried finding the cause but couldn't find any. The tests are passing, I also checked by changing the example in examples/index.js
, the offset
parameter worked there correctly. But for some reason here it is not working as expected. Any insights?
EDIT: The CI failure errors are the opposite of the errors I was getting in Local
* Adds a scalar constant to each element in a single-precision floating-point strided array. | ||
* | ||
* @param {PositiveInteger} N - number of indexed elements | ||
* @param {number} alpha - scalar | ||
* @param {number} alpha - scalar constant | ||
* @param {Float32Array} x - input array | ||
* @param {integer} stride - index increment | ||
* @param {NonNegativeInteger} offset - starting index | ||
* @param {integer} strideX - stride length | ||
* @param {NonNegativeInteger} offsetX - starting index | ||
* @returns {Float32Array} input array | ||
* | ||
* @example | ||
* var Float32Array = require( '@stdlib/array/float32' ); | ||
* | ||
* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] ); | ||
* var alpha = 5.0; | ||
* | ||
* sapx( 3, alpha, x, 1, x.length-3 ); | ||
* // x => <Float32Array>[ 1.0, -2.0, 3.0, 1.0, 10.0, -1.0 ] | ||
* sapx( 3, 5.0, x, 1, x.length-3 ); | ||
* // x => <Float32Array>[ 6.0, 3.0, 8.0, -4.0, 5.0, -6.0 ] | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment here. Notice that the doctest for ndarray.js
passses but for ndarray.native.js
it fails.
lib/node_modules/@stdlib/blas/ext/base/sapx/lib/ndarray.native.js
Outdated
Show resolved
Hide resolved
Signed-off-by: Muhammad Haris <[email protected]>
Signed-off-by: Muhammad Haris <[email protected]>
Description
This pull request:
ndarray
API and refactor `blase/ext/base/sapxRelated Issues
No.
Questions
No.
Other
No.
Checklist
@stdlib-js/reviewers