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
+26-2Lines changed: 26 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,14 +4,37 @@
4
4
5
5
<sectionclass="release"id="unreleased">
6
6
7
-
## Unreleased (2024-12-30)
7
+
## Unreleased (2025-01-22)
8
+
9
+
<sectionclass="features">
10
+
11
+
### Features
12
+
13
+
-[`54148e1`](https://github.com/stdlib-js/stdlib/commit/54148e18d543531ecfa547d752eb4f252d8e51f5) - add C `ndarray` API and refactor `blas/ext/base/srev`[(#4848)](https://github.com/stdlib-js/stdlib/pull/4848)
- To migrate, users should replace usage of `c_srev` with `stdlib_strided_srev`. The API signatures remain the same.
26
+
27
+
</section>
28
+
29
+
<!-- /.breaking-changes -->
8
30
9
31
<sectionclass="commits">
10
32
11
33
### Commits
12
34
13
35
<details>
14
36
37
+
-[`54148e1`](https://github.com/stdlib-js/stdlib/commit/54148e18d543531ecfa547d752eb4f252d8e51f5) - **feat:** add C `ndarray` API and refactor `blas/ext/base/srev`[(#4848)](https://github.com/stdlib-js/stdlib/pull/4848)_(by Muhammad Haris, Athan Reines)_
15
38
-[`62364f6`](https://github.com/stdlib-js/stdlib/commit/62364f62ea823a3b52c2ad25660ecd80c71f8f36) - **style:** fix C comment alignment _(by Philipp Burckhardt)_
The function has the following additional parameters:
126
126
127
-
-**offset**: starting index.
127
+
-**offsetX**: starting index.
128
128
129
-
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 only the last three elements of the strided array
129
+
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 only the last three elements of the strided array:
var discreteUniform =require( '@stdlib/random-base-discrete-uniform' ).factory;
163
-
var filledarrayBy =require( '@stdlib/array-filled-by' );
162
+
var discreteUniform =require( '@stdlib/random-array-discrete-uniform' );
164
163
var srev =require( '@stdlib/blas-ext-base-srev' );
165
164
166
-
varrand=discreteUniform( -100, 100 );
167
-
168
-
var x =filledarrayBy( 10, 'float32', rand );
165
+
varx=discreteUniform( 10, -100, 100, {
166
+
'dtype':'float32'
167
+
});
169
168
console.log( x );
170
169
171
170
srev( x.length, x, 1 );
@@ -176,6 +175,123 @@ console.log( x );
176
175
177
176
<!-- /.examples -->
178
177
178
+
<!-- C interface documentation. -->
179
+
180
+
* * *
181
+
182
+
<sectionclass="c">
183
+
184
+
## C APIs
185
+
186
+
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
187
+
188
+
<sectionclass="intro">
189
+
190
+
</section>
191
+
192
+
<!-- /.intro -->
193
+
194
+
<!-- C usage documentation. -->
195
+
196
+
<sectionclass="usage">
197
+
198
+
### Usage
199
+
200
+
```c
201
+
#include"stdlib/blas/ext/base/srev.h"
202
+
```
203
+
204
+
#### stdlib_strided_srev( N, \*X, strideX )
205
+
206
+
Reverses a single-precision floating-point strided array in-place.
207
+
208
+
```c
209
+
float x[] = { 1.0f, 2.0f, 3.0f, 4.0f };
210
+
211
+
stdlib_strided_srev( 4, x, 1 );
212
+
```
213
+
214
+
The function accepts the following arguments:
215
+
216
+
- **N**: `[in] CBLAS_INT` number of indexed elements.
0 commit comments