Skip to content

Commit e69e102

Browse files
committed
chore: apply review changes
1 parent f3e73e2 commit e69e102

File tree

6 files changed

+54
-30
lines changed

6 files changed

+54
-30
lines changed

lib/node_modules/@stdlib/blas/ext/base/dnannsumpw/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ The function has the following additional parameters:
106106
- **offsetX**: starting index for the strided array.
107107
- **offsetOut**: starting index for `out`.
108108

109-
While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, offset parameters support indexing semantics based on starting indices. For example, to calculate the sum of every other value in the strided array starting from the second value:
109+
While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, offset parameters support indexing semantics based on starting indices. For example, to calculate the sum of every other element starting from the second element:
110110

111111
```javascript
112112
var Float64Array = require( '@stdlib/array/float64' );

lib/node_modules/@stdlib/blas/ext/base/dnannsumpw/benchmark/benchmark.js

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,19 @@ var dnannsumpw = require( './../lib/dnannsumpw.js' );
3333

3434
// FUNCTIONS //
3535

36+
/**
37+
* Returns a random number.
38+
*
39+
* @private
40+
* @returns {number} random number
41+
*/
42+
function rand() {
43+
if ( bernoulli( 0.8 ) > 0 ) {
44+
return uniform( -10.0, 10.0 );
45+
}
46+
return NaN;
47+
}
48+
3649
/**
3750
* Creates a benchmark function.
3851
*
@@ -48,13 +61,6 @@ function createBenchmark( len ) {
4861
out = new Float64Array( 2 );
4962
return benchmark;
5063

51-
function rand() {
52-
if ( bernoulli( 0.8 ) > 0 ) {
53-
return uniform( -10.0, 10.0 );
54-
}
55-
return NaN;
56-
}
57-
5864
function benchmark( b ) {
5965
var i;
6066

lib/node_modules/@stdlib/blas/ext/base/dnannsumpw/benchmark/benchmark.native.js

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,19 @@ var opts = {
4242

4343
// FUNCTIONS //
4444

45+
/**
46+
* Returns a random number.
47+
*
48+
* @private
49+
* @returns {number} random number
50+
*/
51+
function rand() {
52+
if ( bernoulli( 0.8 ) > 0 ) {
53+
return uniform( -10.0, 10.0 );
54+
}
55+
return NaN;
56+
}
57+
4558
/**
4659
* Creates a benchmark function.
4760
*
@@ -57,13 +70,6 @@ function createBenchmark( len ) {
5770
out = new Float64Array( 2 );
5871
return benchmark;
5972

60-
function rand() {
61-
if ( bernoulli( 0.8 ) > 0 ) {
62-
return uniform( -10.0, 10.0 );
63-
}
64-
return NaN;
65-
}
66-
6773
function benchmark( b ) {
6874
var i;
6975

lib/node_modules/@stdlib/blas/ext/base/dnannsumpw/benchmark/benchmark.ndarray.js

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,19 @@ var dnannsumpw = require( './../lib/ndarray.js' );
3333

3434
// FUNCTIONS //
3535

36+
/**
37+
* Returns a random number.
38+
*
39+
* @private
40+
* @returns {number} random number
41+
*/
42+
function rand() {
43+
if ( bernoulli( 0.8 ) > 0 ) {
44+
return uniform( -10.0, 10.0 );
45+
}
46+
return NaN;
47+
}
48+
3649
/**
3750
* Creates a benchmark function.
3851
*
@@ -48,13 +61,6 @@ function createBenchmark( len ) {
4861
out = new Float64Array( 2 );
4962
return benchmark;
5063

51-
function rand() {
52-
if ( bernoulli( 0.8 ) > 0 ) {
53-
return uniform( -10.0, 10.0 );
54-
}
55-
return NaN;
56-
}
57-
5864
function benchmark( b ) {
5965
var i;
6066

lib/node_modules/@stdlib/blas/ext/base/dnannsumpw/benchmark/benchmark.ndarray.native.js

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,19 @@ var opts = {
4242

4343
// FUNCTIONS //
4444

45+
/**
46+
* Returns a random number.
47+
*
48+
* @private
49+
* @returns {number} random number
50+
*/
51+
function rand() {
52+
if ( bernoulli( 0.8 ) > 0 ) {
53+
return uniform( -10.0, 10.0 );
54+
}
55+
return NaN;
56+
}
57+
4558
/**
4659
* Creates a benchmark function.
4760
*
@@ -57,13 +70,6 @@ function createBenchmark( len ) {
5770
out = new Float64Array( 2 );
5871
return benchmark;
5972

60-
function rand() {
61-
if ( bernoulli( 0.8 ) > 0 ) {
62-
return uniform( -10.0, 10.0 );
63-
}
64-
return NaN;
65-
}
66-
6773
function benchmark( b ) {
6874
var i;
6975

lib/node_modules/@stdlib/blas/ext/base/dnannsumpw/docs/repl.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
> {{alias}}( x.length, x, 1, out, 1 )
4343
<Float64Array>[ 1.0, 3 ]
4444

45-
// Using `N` and `stride` parameters:
45+
// Using `N` and stride parameters:
4646
> x = new {{alias:@stdlib/array/float64}}( [ -2.0, 1.0, 1.0, -5.0, 2.0, -1.0, NaN, NaN ] );
4747
> out = new {{alias:@stdlib/array/float64}}( 2 );
4848
> {{alias}}( 4, x, 2, out, 1 )

0 commit comments

Comments
 (0)