Skip to content

feat: add blas/ext/base/wasm/dapx #5643

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

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: resolve lint error
---
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: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: passed
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: na
  - 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: na
  - 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
---
  • Loading branch information
0PrashantYadav0 committed Mar 5, 2025
commit e192bb381cac48fa92bc21892d18e756de1ed9ca
18 changes: 9 additions & 9 deletions lib/node_modules/@stdlib/blas/ext/base/wasm/dapx/lib/routine.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
// MODULES //

var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );
var readDataView = require( '@stdlib/strided/base/read-dataview' ).ndarray;
var inherits = require( '@stdlib/utils/inherit' );
var stride2offset = require( '@stdlib/strided/base/stride2offset' );
var readDataView = require( '@stdlib/strided/base/read-dataview' ).ndarray;
var Memory = require( '@stdlib/wasm/memory' );
var arrays2ptrs = require( '@stdlib/wasm/base/arrays2ptrs' );
var strided2object = require( '@stdlib/wasm/base/strided2object' );
Expand Down Expand Up @@ -70,8 +70,8 @@ var Module = require( './module.js' );
* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );
*
* // Perform operation:
* var y = dapx.ndarray( 4, 5.0, x, 2, 1 );
* // y => Float64Array[ 7.0, 6.0, 7.0, 3.0, 3.0, 7.0, 8.0, 9.0 ]
* dapx.ndarray( 4, 5.0, x, 2, 1 );
* // x => <Float64Array>[ 2.0, 6.0, 2.0, 3.0, -2.0, 7.0, 3.0, 9.0 ]
*/
function Routine() {
if ( !( this instanceof Routine ) ) {
Expand All @@ -87,7 +87,7 @@ function Routine() {
inherits( Routine, Module );

/**
* Adds a scalar constant to each double-precision floating-point strided array element and computes the sum using an improved Kahan–Babuška algorithm.
* Adds a scalar constant to each element in a double-precision floating-point strided array.
*
* @name main
* @memberof Routine.prototype
Expand All @@ -112,8 +112,8 @@ inherits( Routine, Module );
* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );
*
* // Perform operation:
* var y = dapx.main( 3, 5.0, x, 1 );
* // y => <Float64Array>[ 6.0, 3.0, 7.0 ]
* dapx.main( 3, 5.0, x, 1 );
* // x => <Float64Array>[ 6.0, 3.0, 7.0 ]
*/
setReadOnly( Routine.prototype, 'main', function dapx( N, alpha, x, strideX ) {
return this.ndarray( N, alpha, x, strideX, stride2offset( N, strideX ) );
Expand Down Expand Up @@ -146,8 +146,8 @@ setReadOnly( Routine.prototype, 'main', function dapx( N, alpha, x, strideX ) {
* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] );
*
* // Perform operation:
* var y = dapx( 3, 5.0, x, 1, x.length-3 );
* // y => <Float64Array>[ 6.0, 3.0, 8.0, 1.0, 10.0, -1.0 ]
* dapx.ndarray( 3, 5.0, x, 1, x.length-3 );
* // x => <Float64Array>[ 1.0, -2.0, 3.0, 1.0, 10.0, -1.0 ]
*/
setReadOnly( Routine.prototype, 'ndarray', function dapx( N, alpha, x, strideX, offsetX ) {
var ptrs;
Expand All @@ -164,7 +164,7 @@ setReadOnly( Routine.prototype, 'ndarray', function dapx( N, alpha, x, strideX,

// If the output array data had to be copied to module memory, copy the results to the provided output array...
if ( p0.copy ) {
readDataView( N, this.view, p0.stride*p0.BYTES_PER_ELEMENT, p0.ptr, x, strideX, offsetX, true ); // eslint-disable-line max-len
readDataView( N, this.view, p0.stride*p0.BYTES_PER_ELEMENT, p0.ptr, x, strideX, offsetX, true );
}
return x;
});
Expand Down