You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `N` and stride parameters determine which elements in the strided arrays are accessed at runtime. For example, to access every other element in `x`,
59
+
The `N` and stride parameters determine which elements in the strided arrays are accessed at runtime. For example, to access every other element:
@@ -90,15 +90,15 @@ var Float64Array = require( '@stdlib/array/float64' );
90
90
91
91
var x =newFloat64Array( [ 1.0, -2.0, 2.0 ] );
92
92
93
-
var v =dapxsumkbn.ndarray( 3, 5.0, x, 1, 0 );
93
+
var v =dapxsumkbn.ndarray( x.length, 5.0, x, 1, 0 );
94
94
// returns 16.0
95
95
```
96
96
97
97
The function has the following additional parameters:
98
98
99
99
-**offsetX**: starting index for `x`.
100
100
101
-
While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameter supports indexing semantics based on a starting index. For example, to access every other value in `x`starting from the second value
101
+
While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameter supports indexing semantics based on a starting index. For example, to access every other element starting from the second element:
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/blas/ext/base/dapxsumkbn/docs/types/index.d.ts
+3-3
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ interface Routine {
26
26
* Adds a scalar constant to each double-precision floating-point strided array element and computes the sum using an improved Kahan–Babuška algorithm.
27
27
*
28
28
* @param N - number of indexed elements
29
-
* @param alpha - constant
29
+
* @param alpha - scalar constant
30
30
* @param x - input array
31
31
* @param strideX - stride length
32
32
* @returns sum
@@ -45,7 +45,7 @@ interface Routine {
45
45
* 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.
46
46
*
47
47
* @param N - number of indexed elements
48
-
* @param alpha - constant
48
+
* @param alpha - scalar constant
49
49
* @param x - input array
50
50
* @param strideX - stride length
51
51
* @param offsetX - starting index
@@ -66,7 +66,7 @@ interface Routine {
66
66
* Adds a scalar constant to each double-precision floating-point strided array element and computes the sum using an improved Kahan–Babuška algorithm.
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/blas/ext/base/dapxsumkbn/lib/dapxsumkbn.js
+2-3
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ var ndarray = require( './ndarray.js' );
38
38
* - Neumaier, Arnold. 1974. "Rounding Error Analysis of Some Methods for Summing Finite Sums." _Zeitschrift Für Angewandte Mathematik Und Mechanik_ 54 (1): 39–51. doi:[10.1002/zamm.19740540106](https://doi.org/10.1002/zamm.19740540106).
39
39
*
40
40
* @param {PositiveInteger} N - number of indexed elements
41
-
* @param {number} alpha - constant
41
+
* @param {number} alpha - scalar constant
42
42
* @param {Float64Array} x - input array
43
43
* @param {integer} strideX - stride length
44
44
* @returns {number} sum
@@ -47,9 +47,8 @@ var ndarray = require( './ndarray.js' );
47
47
* var Float64Array = require( '@stdlib/array/float64' );
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/blas/ext/base/dapxsumkbn/lib/ndarray.js
+4-4
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ var abs = require( '@stdlib/math/base/special/abs' );
37
37
* - Neumaier, Arnold. 1974. "Rounding Error Analysis of Some Methods for Summing Finite Sums." _Zeitschrift Für Angewandte Mathematik Und Mechanik_ 54 (1): 39–51. doi:[10.1002/zamm.19740540106](https://doi.org/10.1002/zamm.19740540106).
38
38
*
39
39
* @param {PositiveInteger} N - number of indexed elements
40
-
* @param {number} alpha - constant
40
+
* @param {number} alpha - scalar constant
41
41
* @param {Float64Array} x - input array
42
42
* @param {integer} strideX - stride length
43
43
* @param {NonNegativeInteger} offsetX - starting index
@@ -62,10 +62,10 @@ function dapxsumkbn( N, alpha, x, strideX, offsetX ) {
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/blas/ext/base/dapxsumkbn/src/main.c
+5-5
Original file line number
Diff line number
Diff line change
@@ -47,9 +47,9 @@ double API_SUFFIX(stdlib_strided_dapxsumkbn)( const CBLAS_INT N, const double al
47
47
* 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.
0 commit comments