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
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,17 @@
4
4
5
5
<sectionclass="release"id="unreleased">
6
6
7
-
## Unreleased (2024-09-21)
7
+
## Unreleased (2024-09-22)
8
+
9
+
<sectionclass="features">
10
+
11
+
### Features
12
+
13
+
-[`a187bfc`](https://github.com/stdlib-js/stdlib/commit/a187bfc1f71912625823d786f7b1234b224b323d) - add C `ndarray` API and refactor `blas/ext/base/dapx`[(#2929)](https://github.com/stdlib-js/stdlib/pull/2929)
14
+
15
+
</section>
16
+
17
+
<!-- /.features -->
8
18
9
19
<sectionclass="bug-fixes">
10
20
@@ -22,6 +32,7 @@
22
32
23
33
<details>
24
34
35
+
-[`a187bfc`](https://github.com/stdlib-js/stdlib/commit/a187bfc1f71912625823d786f7b1234b224b323d) - **feat:** add C `ndarray` API and refactor `blas/ext/base/dapx`[(#2929)](https://github.com/stdlib-js/stdlib/pull/2929)_(by Muhammad Haris, Athan Reines)_
25
36
-[`e4de24f`](https://github.com/stdlib-js/stdlib/commit/e4de24f1e086063876214e73f1f6b659dc624eb1) - **fix:** resolve bugs in addon.c files _(by Philipp Burckhardt)_
The `N` and `stride` parameters determine which elements in the strided array are accessed at runtime. For example, to add a constant to every other element
86
+
The `N` and stride parameters determine which elements in the strided array are accessed at runtime. For example, to add a constant to every other element
The function has the following additional parameters:
127
127
128
-
-**offset**: starting index.
128
+
-**offsetX**: starting index.
129
129
130
-
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
130
+
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 dapx =require( '@stdlib/blas-ext-base-dapx' );
165
164
166
-
var x =filledarrayBy( 10, 'float64', discreteUniform( -100, 100 ) );
165
+
var x =discreteUniform( 10, -100, 100, {
166
+
'dtype':'float64'
167
+
});
167
168
console.log( x );
168
169
169
170
dapx( x.length, 5.0, x, 1 );
@@ -174,6 +175,126 @@ console.log( x );
174
175
175
176
<!-- /.examples -->
176
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/dapx.h"
202
+
```
203
+
204
+
#### c_dapx( N, alpha, \*X, strideX )
205
+
206
+
Adds a scalar constant `alpha` to each element in a double-precision floating-point strided array.
207
+
208
+
```c
209
+
double x[] = { 1.0, 2.0, 3.0, 4.0 };
210
+
211
+
c_dapx( 4, 5.0, x, 1 );
212
+
213
+
```
214
+
215
+
The function accepts the following arguments:
216
+
217
+
- **N**: `[in] CBLAS_INT` number of indexed elements.
218
+
- **alpha**: `[in] double` scalar constant.
219
+
- **X**: `[inout] double*` input array.
220
+
- **strideX**: `[in] CBLAS_INT` index increment for `X`.
0 commit comments