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
Copy file name to clipboardExpand all lines: CHANGELOG.md
+14-2Lines changed: 14 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -4,14 +4,25 @@
4
4
5
5
<sectionclass="release"id="unreleased">
6
6
7
-
## Unreleased (2024-12-23)
7
+
## Unreleased (2025-01-02)
8
+
9
+
<sectionclass="features">
10
+
11
+
### Features
12
+
13
+
-[`f78ae7b`](https://github.com/stdlib-js/stdlib/commit/f78ae7b4ed12879282a4e9c20e6c7b5baf2d6e39) - add C `ndarray` API and refactor `blas/ext/base/dssum`[(#4262)](https://github.com/stdlib-js/stdlib/pull/4262)
14
+
15
+
</section>
16
+
17
+
<!-- /.features -->
8
18
9
19
<sectionclass="commits">
10
20
11
21
### Commits
12
22
13
23
<details>
14
24
25
+
-[`f78ae7b`](https://github.com/stdlib-js/stdlib/commit/f78ae7b4ed12879282a4e9c20e6c7b5baf2d6e39) - **feat:** add C `ndarray` API and refactor `blas/ext/base/dssum`[(#4262)](https://github.com/stdlib-js/stdlib/pull/4262)_(by Muhammad Haris)_
15
26
-[`62364f6`](https://github.com/stdlib-js/stdlib/commit/62364f62ea823a3b52c2ad25660ecd80c71f8f36) - **style:** fix C comment alignment _(by Philipp Burckhardt)_
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 the strided array,
91
+
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:
Computes the sum of single-precision floating-point strided array elements using extended accumulation and alternative indexing semantics and returning an extended precision result.
120
119
@@ -129,9 +128,9 @@ var v = dssum.ndarray( 3, x, 1, 0 );
129
128
130
129
The function has the following additional parameters:
131
130
132
-
-**offset**: starting index for `x`.
131
+
-**offsetX**: starting index for `x`.
133
132
134
-
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 the strided array starting from the second value
133
+
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:
@@ -164,11 +163,12 @@ var v = dssum.ndarray( 4, x, 2, 1 );
164
163
<!-- eslint no-undef: "error" -->
165
164
166
165
```javascript
167
-
var discreteUniform =require( '@stdlib/random-base-discrete-uniform' ).factory;
168
-
var filledarrayBy =require( '@stdlib/array-filled-by' );
166
+
var discreteUniform =require( '@stdlib/random-array-discrete-uniform' );
169
167
var dssum =require( '@stdlib/blas-ext-base-dssum' );
170
168
171
-
var x =filledarrayBy( 10, 'float32', discreteUniform( 0, 100 ) );
169
+
var x =discreteUniform( 10.0, -100, 100, {
170
+
'dtype':'float32'
171
+
});
172
172
console.log( x );
173
173
174
174
var v =dssum( x.length, x, 1 );
@@ -179,6 +179,123 @@ console.log( v );
179
179
180
180
<!-- /.examples -->
181
181
182
+
<!-- C interface documentation. -->
183
+
184
+
* * *
185
+
186
+
<sectionclass="c">
187
+
188
+
## C APIs
189
+
190
+
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
191
+
192
+
<sectionclass="intro">
193
+
194
+
</section>
195
+
196
+
<!-- /.intro -->
197
+
198
+
<!-- C usage documentation. -->
199
+
200
+
<sectionclass="usage">
201
+
202
+
### Usage
203
+
204
+
```c
205
+
#include"stdlib/blas/ext/base/dssum.h"
206
+
```
207
+
208
+
#### stdlib_strided_dssum( N, \*X, strideX )
209
+
210
+
Computes the sum of single-precision floating-point strided array elements using extended accumulation and returning an extended precision result.
211
+
212
+
```c
213
+
constfloat x[] = { 1.0f, 2.0f, 3.0f, 4.0f };
214
+
215
+
double v = stdlib_strided_dssum( 4, x, 1 );
216
+
// returns 10.0
217
+
```
218
+
219
+
The function accepts the following arguments:
220
+
221
+
- **N**: `[in] CBLAS_INT` number of indexed elements.
222
+
- **X**: `[in] float*` input array.
223
+
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
#### stdlib_strided_dssum_ndarray( N, \*X, strideX, offsetX )
230
+
231
+
Computes the sum of single-precision floating-point strided array elements using extended accumulation and alternative indexing semantics and returning an extended precision result.
232
+
233
+
```c
234
+
constfloat x[] = { 1.0f, 2.0f, 3.0f, 4.0f };
235
+
236
+
double v = stdlib_strided_dssum_ndarray( 4, x, 1, 0 );
237
+
// returns 10.0
238
+
```
239
+
240
+
The function accepts the following arguments:
241
+
242
+
- **N**: `[in] CBLAS_INT` number of indexed elements.
243
+
- **X**: `[in] float*` input array.
244
+
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
245
+
- **offsetX**: `[in] CBLAS_INT` starting index for `X`.
0 commit comments