Skip to content

Commit 6d85037

Browse files
committed
chore: code review
--- 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: passed - 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: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed ---
1 parent 3002de9 commit 6d85037

File tree

5 files changed

+13
-41
lines changed

5 files changed

+13
-41
lines changed

lib/node_modules/@stdlib/blas/ext/base/wasm/dasumpw/docs/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ interface Routine extends ModuleWrapper {
285285
}
286286

287287
/**
288-
* Adds a scalar constant to each double-precision floating-point strided array element and computes the sum using an improved Kahan–Babuška algorithm.
288+
* Computes the sum of absolute values (L1 norm) of double-precision floating-point strided array elements using pairwise summation.
289289
*
290290
* @param N - number of indexed elements
291291
* @param x - input array

lib/node_modules/@stdlib/blas/ext/base/wasm/dasumpw/docs/types/test.ts

Lines changed: 7 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,7 @@ import dasumpw = require( './index' );
4545
dasumpw.main( ( x: number ): number => x, x, 1 ); // $ExpectError
4646
}
4747

48-
// The compiler throws an error if the `main` method is provided a second argument which is not a number...
49-
{
50-
const x = new Float64Array( 10 );
51-
52-
dasumpw.main( x.length, '10', x, 1 ); // $ExpectError
53-
dasumpw.main( x.length, true, x, 1 ); // $ExpectError
54-
dasumpw.main( x.length, false, x, 1 ); // $ExpectError
55-
dasumpw.main( x.length, null, x, 1 ); // $ExpectError
56-
dasumpw.main( x.length, undefined, x, 1 ); // $ExpectError
57-
dasumpw.main( x.length, [], x, 1 ); // $ExpectError
58-
dasumpw.main( x.length, {}, x, 1 ); // $ExpectError
59-
dasumpw.main( x.length, ( x: number ): number => x, x, 1 ); // $ExpectError
60-
}
61-
62-
// The compiler throws an error if the `main` method is provided a third argument which is not a Float64Array...
48+
// The compiler throws an error if the `main` method is provided a second argument which is not a Float64Array...
6349
{
6450
const x = new Float64Array( 10 );
6551

@@ -74,7 +60,7 @@ import dasumpw = require( './index' );
7460
dasumpw.main( x.length, ( x: number ): number => x, 1 ); // $ExpectError
7561
}
7662

77-
// The compiler throws an error if the `main` method is provided a fourth argument which is not a number...
63+
// The compiler throws an error if the `main` method is provided a third argument which is not a number...
7864
{
7965
const x = new Float64Array( 10 );
8066

@@ -95,7 +81,7 @@ import dasumpw = require( './index' );
9581
dasumpw.main(); // $ExpectError
9682
dasumpw.main( x.length ); // $ExpectError
9783
dasumpw.main( x.length, x ); // $ExpectError
98-
dasumpw.main( x.length, x, 1, 10, 2 ); // $ExpectError
84+
dasumpw.main( x.length, x, 1, 2 ); // $ExpectError
9985
}
10086

10187
// Attached to main export is an `ndarray` method which returns a number...
@@ -119,21 +105,7 @@ import dasumpw = require( './index' );
119105
dasumpw.ndarray( ( x: number ): number => x, x, 1, 0 ); // $ExpectError
120106
}
121107

122-
// The compiler throws an error if the `ndarray` method is provided a second argument which is not a number...
123-
{
124-
const x = new Float64Array( 10 );
125-
126-
dasumpw.ndarray( x.length, '10', x, 1, 0 ); // $ExpectError
127-
dasumpw.ndarray( x.length, true, x, 1, 0 ); // $ExpectError
128-
dasumpw.ndarray( x.length, false, x, 1, 0 ); // $ExpectError
129-
dasumpw.ndarray( x.length, null, x, 1, 0 ); // $ExpectError
130-
dasumpw.ndarray( x.length, undefined, x, 1, 0 ); // $ExpectError
131-
dasumpw.ndarray( x.length, [], x, 1, 0 ); // $ExpectError
132-
dasumpw.ndarray( x.length, {}, x, 1, 0 ); // $ExpectError
133-
dasumpw.ndarray( x.length, ( x: number ): number => x, x, 1, 0 ); // $ExpectError
134-
}
135-
136-
// The compiler throws an error if the `ndarray` method is provided a third argument which is not a Float64Array...
108+
// The compiler throws an error if the `ndarray` method is provided a second argument which is not a Float64Array...
137109
{
138110
const x = new Float64Array( 10 );
139111

@@ -148,7 +120,7 @@ import dasumpw = require( './index' );
148120
dasumpw.ndarray( x.length, ( x: number ): number => x, 1, 0 ); // $ExpectError
149121
}
150122

151-
// The compiler throws an error if the `ndarray` method is provided a fourth argument which is not a number...
123+
// The compiler throws an error if the `ndarray` method is provided a third argument which is not a number...
152124
{
153125
const x = new Float64Array( 10 );
154126

@@ -162,7 +134,7 @@ import dasumpw = require( './index' );
162134
dasumpw.ndarray( x.length, x, ( x: number ): number => x, 0 ); // $ExpectError
163135
}
164136

165-
// The compiler throws an error if the `ndarray` method is provided a fifth argument which is not a number...
137+
// The compiler throws an error if the `ndarray` method is provided a fourth argument which is not a number...
166138
{
167139
const x = new Float64Array( 10 );
168140

@@ -184,7 +156,7 @@ import dasumpw = require( './index' );
184156
dasumpw.ndarray( x.length ); // $ExpectError
185157
dasumpw.ndarray( x.length, x ); // $ExpectError
186158
dasumpw.ndarray( x.length, x, 1 ); // $ExpectError
187-
dasumpw.ndarray( x.length, x, 1, 0, 10, 2 ); // $ExpectError
159+
dasumpw.ndarray( x.length, x, 1, 0, 10 ); // $ExpectError
188160
}
189161

190162
// Attached to the main export is a `Module` constructor which returns a module...

lib/node_modules/@stdlib/blas/ext/base/wasm/dasumpw/lib/routine.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function Routine() {
8686
inherits( Routine, Module );
8787

8888
/**
89-
* Adds a scalar constant to each double-precision floating-point strided array element and computes the sum using an improved Kahan–Babuška algorithm.
89+
* Computes the sum of absolute values (L1 norm) of double-precision floating-point strided array elements using pairwise summation.
9090
*
9191
* @name main
9292
* @memberof Routine.prototype
@@ -118,7 +118,7 @@ setReadOnly( Routine.prototype, 'main', function dasumpw( N, x, strideX ) {
118118
});
119119

120120
/**
121-
* Adds a scalar constant to each double-precision floating-point strided array element and computes the sum using an improved Kahan–Babuška algorithm and alternative indexing semantics.
121+
* Computes the sum of absolute values (L1 norm) of double-precision floating-point strided array elements using pairwise summation and alternative indexing semantics.
122122
*
123123
* @name ndarray
124124
* @memberof Routine.prototype

lib/node_modules/@stdlib/blas/ext/base/wasm/dasumpw/test/test.module.main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ tape( 'a module instance has a `main` method which has an arity of 3', function
4848
t.end();
4949
});
5050

51-
tape( 'a module instance has a `main` method that the sum of absolute values of all strided array elements', function test( t ) {
51+
tape( 'a module instance has a `main` method that computes the sum of absolute values of strided array elements', function test( t ) {
5252
var mem;
5353
var mod;
5454
var xp;
@@ -179,7 +179,7 @@ tape( 'a module instance has a `main` method which supports a negative `stride`
179179
t.end();
180180
});
181181

182-
tape( 'if provided an `stride` parameter equal to `0`, a module instance has a `main` method which returns the absolute value of the first element repeated N times', function test( t ) {
182+
tape( 'if provided an `stride` parameter equal to `0`, a module instance has a `main` method which returns sum of the absolute value of the first element repeated N times', function test( t ) {
183183
var mem;
184184
var mod;
185185
var xp;

lib/node_modules/@stdlib/blas/ext/base/wasm/dasumpw/test/test.ndarray.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ tape( 'if provided an `N` parameter less than or equal to `0`, the function retu
8989
t.end();
9090
});
9191

92-
tape( 'if provided an `N` parameter equal to `1`, the function returns the first element', function test( t ) {
92+
tape( 'if provided an `N` parameter equal to `1`, the function returns the absolute value of the first element', function test( t ) {
9393
var x;
9494
var v;
9595

0 commit comments

Comments
 (0)