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
@@ -36,27 +36,26 @@ limitations under the License.
36
36
var dsnansumpw =require( '@stdlib/blas/ext/base/dsnansumpw' );
37
37
```
38
38
39
-
#### dsnansumpw( N, x, stride )
39
+
#### dsnansumpw( N, x, strideX )
40
40
41
41
Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values, using pairwise summation with extended accumulation, and returning an extended precision result.
The `N` and `stride` parameters determine which elements in the strided array are accessed at runtime. For example, to compute the sum of every other element in `x`,
58
+
The `N` and stride parameters determine which elements in the strided array are accessed at runtime. For example, to compute the sum of every other element:
@@ -81,25 +80,24 @@ var v = dsnansumpw( 4, x1, 2 );
81
80
// returns 5.0
82
81
```
83
82
84
-
#### dsnansumpw.ndarray( N, x, stride, offset )
83
+
#### dsnansumpw.ndarray( N, x, strideX, offsetX )
85
84
86
-
Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using pairwise summation with extended accumulation and alternative indexing semantics.
85
+
Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values, using pairwise summation with extended accumulation and alternative indexing semantics, and returning an extended precision result.
var x =newFloat32Array( [ 1.0, -2.0, NaN, 2.0 ] );
92
-
varN=x.length;
93
91
94
-
var v =dsnansumpw.ndarray( N, x, 1, 0 );
92
+
var v =dsnansumpw.ndarray( x.length, x, 1, 0 );
95
93
// returns 1.0
96
94
```
97
95
98
96
The function has the following additional parameters:
99
97
100
-
-**offset**: starting index for `x`.
98
+
-**offsetX**: starting index for `x`.
101
99
102
-
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 calculate the sum of every other value in `x`starting from the second value
100
+
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 calculate the sum of every other element starting from the second element:
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
165
+
166
+
<sectionclass="intro">
167
+
168
+
</section>
169
+
170
+
<!-- /.intro -->
171
+
172
+
<!-- C usage documentation. -->
173
+
174
+
<sectionclass="usage">
175
+
176
+
### Usage
177
+
178
+
```c
179
+
#include"stdlib/blas/ext/base/dsnansumpw.h"
180
+
```
181
+
182
+
#### stdlib_strided_dsnansumpw( N, \*X, strideX )
183
+
184
+
Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values, using pairwise summation with extended accumulation, and returning an extended precision result.
#### stdlib_strided_dsnansumpw_ndarray( N, \*X, strideX, offsetX )
204
+
205
+
Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values, using pairwise summation with extended accumulation and alternative indexing semantics, and returning an extended precision result.
0 commit comments