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
-[`ee9a830`](https://github.com/stdlib-js/stdlib/commit/ee9a8300ba0f24dabe4b7b67ffb3bbe94f251b36) - add C `ndarray` API and refactor `blas/ext/base/drev`[(#3071)](https://github.com/stdlib-js/stdlib/pull/3071)
@@ -160,6 +182,7 @@ A total of 3 people contributed to this release. Thank you to the following cont
160
182
161
183
<details>
162
184
185
+
-[`ee9a830`](https://github.com/stdlib-js/stdlib/commit/ee9a8300ba0f24dabe4b7b67ffb3bbe94f251b36) - **feat:** add C `ndarray` API and refactor `blas/ext/base/drev`[(#3071)](https://github.com/stdlib-js/stdlib/pull/3071)_(by Muhammad Haris)_
163
186
-[`a341f85`](https://github.com/stdlib-js/stdlib/commit/a341f857ab541502a4e2b0b4b805c41e68e46fd6) - **feat:** add C `ndarray` API and refactor `blas/ext/base/dsnannsumors`[(#3086)](https://github.com/stdlib-js/stdlib/pull/3086)_(by Muhammad Haris)_
164
187
-[`af8d471`](https://github.com/stdlib-js/stdlib/commit/af8d471a7e01113f814a78fc411c7949b69ca1f3) - **feat:** add C `ndarray` API and refactor `blas/ext/base/dnannsumors`[(#2991)](https://github.com/stdlib-js/stdlib/pull/2991)_(by Muhammad Haris)_
165
188
-[`796d76a`](https://github.com/stdlib-js/stdlib/commit/796d76a43a378cd5496e4222baac2bde1658e6da) - **feat:** add C `ndarray` API and refactor `blas/ext/base/dnansum`[(#3052)](https://github.com/stdlib-js/stdlib/pull/3052)_(by Muhammad Haris)_
The function has the following additional parameters:
93
93
94
-
-**offset**: starting index.
94
+
-**offsetX**: starting index for `x`.
95
95
96
-
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
96
+
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;
130
-
var filledarrayBy =require( '@stdlib/array/filled-by' );
129
+
var discreteUniform =require( '@stdlib/random/array/discrete-uniform' );
131
130
var drev =require( '@stdlib/blas/ext/base/drev' );
132
131
133
-
var x =filledarrayBy( 10, 'float64', discreteUniform( -100.0, 100.0 ) );
132
+
var x =discreteUniform( 10, -100, 100, {
133
+
'dtype':'float64'
134
+
});
134
135
console.log( x );
135
136
136
137
drev( x.length, x, 1 );
@@ -141,6 +142,123 @@ console.log( x );
141
142
142
143
<!-- /.examples -->
143
144
145
+
<!-- C interface documentation. -->
146
+
147
+
* * *
148
+
149
+
<sectionclass="c">
150
+
151
+
## C APIs
152
+
153
+
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
154
+
155
+
<sectionclass="intro">
156
+
157
+
</section>
158
+
159
+
<!-- /.intro -->
160
+
161
+
<!-- C usage documentation. -->
162
+
163
+
<sectionclass="usage">
164
+
165
+
### Usage
166
+
167
+
```c
168
+
#include"stdlib/blas/ext/base/drev.h"
169
+
```
170
+
171
+
#### stdlib_strided_drev( N, \*X, strideX )
172
+
173
+
Reverses a double-precision floating-point strided array `X` in-place.
174
+
175
+
```c
176
+
double x[] = { 1.0, 2.0, 3.0, 4.0 };
177
+
178
+
stdlib_strided_drev( 4, x, 1 );
179
+
```
180
+
181
+
The function accepts the following arguments:
182
+
183
+
- **N**: `[in] CBLAS_INT` number of indexed elements.
184
+
- **X**: `[in] double*` input array.
185
+
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
0 commit comments