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
var dssumors =require( '@stdlib/blas/ext/base/dssumors' );
37
37
```
38
38
39
-
#### dssumors( N, x, stride )
39
+
#### dssumors( N, x, strideX )
40
40
41
41
Computes the sum of single-precision floating-point strided array elements using ordinary recursive summation with extended accumulation and returning an extended precision result.
42
42
@@ -45,17 +45,17 @@ var Float32Array = require( '@stdlib/array/float32' );
The `N` and `stride` parameters determine which elements in the strided arrays 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 arrays are accessed at runtime. For example, to compute the sum of every other element:
Computes the sum of single-precision floating-point strided array elements using ordinary recursive summation with extended accumulation and alternative indexing semantics and returning an extended precision result.
86
86
@@ -89,15 +89,15 @@ var Float32Array = require( '@stdlib/array/float32' );
89
89
90
90
var x =newFloat32Array( [ 1.0, -2.0, 2.0 ] );
91
91
92
-
var v =dssumors.ndarray( 3, x, 1, 0 );
92
+
var v =dssumors.ndarray( x.length, x, 1, 0 );
93
93
// returns 1.0
94
94
```
95
95
96
96
The function has the following additional parameters:
97
97
98
-
-**offset**: starting index for `x`.
98
+
-**offsetX**: starting index for `x`.
99
99
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 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:
var discreteUniform =require( '@stdlib/random/array/discrete-uniform' );
136
134
var dssumors =require( '@stdlib/blas/ext/base/dssumors' );
137
135
138
-
var x =filledarrayBy( 10, 'float64', discreteUniform( 0, 100 ) );
136
+
var x =discreteUniform( 10.0, -100, 100, {
137
+
'dtype':'float32'
138
+
});
139
139
console.log( x );
140
140
141
141
var v =dssumors( x.length, x, 1 );
@@ -146,6 +146,123 @@ console.log( v );
146
146
147
147
<!-- /.examples -->
148
148
149
+
<!-- C interface documentation. -->
150
+
151
+
* * *
152
+
153
+
<sectionclass="c">
154
+
155
+
## C APIs
156
+
157
+
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
158
+
159
+
<sectionclass="intro">
160
+
161
+
</section>
162
+
163
+
<!-- /.intro -->
164
+
165
+
<!-- C usage documentation. -->
166
+
167
+
<sectionclass="usage">
168
+
169
+
### Usage
170
+
171
+
```c
172
+
#include"stdlib/blas/ext/base/dssumors.h"
173
+
```
174
+
175
+
#### stdlib_strided_dssumors( N, \*X, strideX )
176
+
177
+
Computes the sum of single-precision floating-point strided array elements using ordinary recursive summation with extended accumulation and returning an extended precision result.
#### stdlib_strided_dssumors_ndarray( N, \*X, strideX, offsetX )
197
+
198
+
Computes the sum of single-precision floating-point strided array elements using ordinary recursive summation with extended accumulation and alternative indexing semantics and returning an extended precision result.
0 commit comments