Skip to content

Commit b5c0d0b

Browse files
Merge branch 'stdlib-js:develop' into int32-is-even
2 parents 0e9c8e9 + 074b9a1 commit b5c0d0b

File tree

276 files changed

+7245
-2934
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

276 files changed

+7245
-2934
lines changed

README.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,10 @@ Thank you for being a part of our community! Your support is invaluable to us!
7777

7878
### External Resources
7979

80-
- [**Open Collective**][open-collective-stdlib]
81-
- [**Twitter**][stdlib-twitter]
82-
- [**Gitter**][stdlib-gitter]
80+
- [**Google Calendar**][stdlib-public-calendar]: calendar of public events, including [open office hours][stdlib-office-hours].
81+
- [**Open Collective**][open-collective-stdlib]: financially support the project.
82+
- [**Twitter**][stdlib-twitter]: follow us on social media.
83+
- [**Gitter**][stdlib-gitter]: chat with project maintainers and other community members.
8384

8485
## Features
8586

@@ -182,11 +183,11 @@ While this project's installation instructions defaults to using [npm][npm] for
182183
- I would like to include stdlib functionality by just using a `script` tag.
183184

184185
- I would like to use ES Modules.
185-
186+
186187
- Use an individual package's ES Module [build](#install_env_builds_esm).
187-
188+
188189
- I would like to use a pre-built bundle (possibly via a CDN, such as [unpkg][unpkg] or [jsDelivr][jsdelivr]).
189-
190+
190191
- Install (or consume via a CDN) an individual package's pre-built UMD [browser bundle](#install_env_builds_umd).
191192

192193
- I am interested in using a substantial amount of functionality found in a top-level stdlib namespace and don't want to separately install hundreds of individual packages (e.g., if building an on-line calculator application and wanting all of stdlib's math functionality).
@@ -200,9 +201,9 @@ While this project's installation instructions defaults to using [npm][npm] for
200201
- I am interested in using various functionality found in stdlib.
201202

202203
- Install [individual packages](#install_individual_packages). Installing the entire project is likely unnecessary and will lead to slower installation times.
203-
204+
204205
- I would like to **vendor** stdlib functionality and avoid dependency trees.
205-
206+
206207
- Install individual package UMD [bundles](#install_env_builds_nodejs).
207208

208209
- I am interested in using a _substantial_ amount of functionality found in a top-level stdlib namespace and don't want to separately install hundreds of individual packages.
@@ -658,6 +659,10 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors].
658659
659660
[![Chat][chat-image]][chat-url]
660661
662+
Have something you want to discuss? In addition to the community chat, we hold regular [office hours][stdlib-office-hours] over video conferencing, which is a great opportunity to ask questions, share ideas, and engage directly with the stdlib team.
663+
664+
You can also subscribe to our [project calendar][stdlib-public-calendar] to stay informed about the latest public community events.
665+
661666
</section>
662667
663668
<!-- /.badges> -->
@@ -779,6 +784,10 @@ Test and build infrastructure is generously provided by the following services:
779784
780785
[stdlib-code-coverage]: https://codecov.io/github/stdlib-js/stdlib/branch/develop
781786
787+
[stdlib-public-calendar]: https://calendar.google.com/calendar/embed?src=a72677fe2820c833714b8b9a2aa87393f742bcaf0d0f6c9499eee6661795eae0%40group.calendar.google.com
788+
789+
[stdlib-office-hours]: https://github.com/stdlib-js/meetings/issues?q=sort%3Aupdated-desc%20is%3Aissue%20is%3Aopen%20label%3A%22Office%20Hours%22
790+
782791
[open-collective-stdlib]: https://opencollective.com/stdlib
783792
784793
[stdlib-twitter]: https://twitter.com/stdlibjs

lib/node_modules/@stdlib/array/fixed-endian-float32/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,13 @@ logEach( '%s', out );
422422

423423
<section class="related">
424424

425+
* * *
426+
427+
## See Also
428+
429+
- <span class="package-name">[`@stdlib/array/fixed-endian-float64`][@stdlib/array/fixed-endian-float64]</span><span class="delimiter">: </span><span class="description">Float64Array having a specified byte order.</span>
430+
- <span class="package-name">[`@stdlib/array/float32`][@stdlib/array/float32]</span><span class="delimiter">: </span><span class="description">Float32Array.</span>
431+
425432
</section>
426433

427434
<!-- /.related -->
@@ -438,6 +445,12 @@ logEach( '%s', out );
438445

439446
[@stdlib/array/float32]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/float32
440447

448+
<!-- <related-links> -->
449+
450+
[@stdlib/array/fixed-endian-float64]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/fixed-endian-float64
451+
452+
<!-- </related-links> -->
453+
441454
</section>
442455

443456
<!-- /.links -->

lib/node_modules/@stdlib/blas/ext/base/dsumors/README.md

Lines changed: 129 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,27 +36,26 @@ limitations under the License.
3636
var dsumors = require( '@stdlib/blas/ext/base/dsumors' );
3737
```
3838

39-
#### dsumors( N, x, stride )
39+
#### dsumors( N, x, strideX )
4040

4141
Computes the sum of double-precision floating-point strided array elements using ordinary recursive summation.
4242

4343
```javascript
4444
var Float64Array = require( '@stdlib/array/float64' );
4545

4646
var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );
47-
var N = x.length;
4847

49-
var v = dsumors( N, x, 1 );
48+
var v = dsumors( x.length, x, 1 );
5049
// returns 1.0
5150
```
5251

5352
The function has the following parameters:
5453

5554
- **N**: number of indexed elements.
5655
- **x**: input [`Float64Array`][@stdlib/array/float64].
57-
- **stride**: index increment for `x`.
56+
- **strideX**: stride length for `x`.
5857

59-
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 `x`,
58+
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:
6059

6160
```javascript
6261
var Float64Array = require( '@stdlib/array/float64' );
@@ -81,25 +80,24 @@ var v = dsumors( 4, x1, 2 );
8180
// returns 5.0
8281
```
8382

84-
#### dsumors.ndarray( N, x, stride, offset )
83+
#### dsumors.ndarray( N, x, strideX, offsetX )
8584

8685
Computes the sum of double-precision floating-point strided array elements using ordinary recursive summation and alternative indexing semantics.
8786

8887
```javascript
8988
var Float64Array = require( '@stdlib/array/float64' );
9089

9190
var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );
92-
var N = x.length;
9391

94-
var v = dsumors.ndarray( N, x, 1, 0 );
92+
var v = dsumors.ndarray( x.length, x, 1, 0 );
9593
// returns 1.0
9694
```
9795

9896
The function has the following additional parameters:
9997

100-
- **offset**: starting index for `x`.
98+
- **offsetX**: starting index for `x`.
10199

102-
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:
103101

104102
```javascript
105103
var Float64Array = require( '@stdlib/array/float64' );
@@ -132,11 +130,12 @@ var v = dsumors.ndarray( 4, x, 2, 1 );
132130
<!-- eslint no-undef: "error" -->
133131

134132
```javascript
135-
var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ).factory;
136-
var filledarrayBy = require( '@stdlib/array/filled-by' );
133+
var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
137134
var dsumors = require( '@stdlib/blas/ext/base/dsumors' );
138135

139-
var x = filledarrayBy( 10, 'float64', discreteUniform( 0, 100 ) );
136+
var x = discreteUniform( 10, -100, 100, {
137+
'dtype': 'float64'
138+
});
140139
console.log( x );
141140

142141
var v = dsumors( x.length, x, 1 );
@@ -147,6 +146,123 @@ console.log( v );
147146

148147
<!-- /.examples -->
149148

149+
<!-- C interface documentation. -->
150+
151+
* * *
152+
153+
<section class="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+
<section class="intro">
160+
161+
</section>
162+
163+
<!-- /.intro -->
164+
165+
<!-- C usage documentation. -->
166+
167+
<section class="usage">
168+
169+
### Usage
170+
171+
```c
172+
#include "stdlib/blas/ext/base/dsumors.h"
173+
```
174+
175+
#### stdlib_strided_dsumors( N, \*X, strideX )
176+
177+
Computes the sum of double-precision floating-point strided array elements using ordinary recursive summation.
178+
179+
```c
180+
const double x[] = { 1.0, 2.0, 3.0, 4.0 };
181+
182+
double v = stdlib_strided_dsumors( 4, x, 1 );
183+
// returns 10.0
184+
```
185+
186+
The function accepts the following arguments:
187+
188+
- **N**: `[in] CBLAS_INT` number of indexed elements.
189+
- **X**: `[in] double*` input array.
190+
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
191+
192+
```c
193+
double stdlib_strided_dsumors( const CBLAS_INT N, const double *X, const CBLAS_INT strideX );
194+
```
195+
196+
#### stdlib_strided_dsumors_ndarray( N, \*X, strideX, offsetX )
197+
198+
Computes the sum of double-precision floating-point strided array elements using ordinary recursive summation and alternative indexing semantics.
199+
200+
```c
201+
const double x[] = { 1.0, 2.0, 3.0, 4.0 };
202+
203+
double v = stdlib_strided_dsumors_ndarray( 4, x, 1, 0 );
204+
// returns 10.0
205+
```
206+
207+
The function accepts the following arguments:
208+
209+
- **N**: `[in] CBLAS_INT` number of indexed elements.
210+
- **X**: `[in] double*` input array.
211+
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
212+
- **offsetX**: `[in] CBLAS_INT` starting index for `X`.
213+
214+
```c
215+
double stdlib_strided_dsumors_ndarray( const CBLAS_INT N, const double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX );
216+
```
217+
218+
</section>
219+
220+
<!-- /.usage -->
221+
222+
<!-- C API usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
223+
224+
<section class="notes">
225+
226+
</section>
227+
228+
<!-- /.notes -->
229+
230+
<!-- C API usage examples. -->
231+
232+
<section class="examples">
233+
234+
### Examples
235+
236+
```c
237+
#include "stdlib/blas/ext/base/dsumors.h"
238+
#include <stdio.h>
239+
240+
int main( void ) {
241+
// Create a strided array:
242+
const double x[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 };
243+
244+
// Specify the number of elements:
245+
const int N = 4;
246+
247+
// Specify the stride length:
248+
const int strideX = 2;
249+
250+
// Compute the sum:
251+
double v = stdlib_strided_dsumors( N, x, strideX );
252+
253+
// Print the result:
254+
printf( "sum: %lf\n", v );
255+
}
256+
```
257+
258+
</section>
259+
260+
<!-- /.examples -->
261+
262+
</section>
263+
264+
<!-- /.c -->
265+
150266
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
151267
152268
<section class="related">

lib/node_modules/@stdlib/blas/ext/base/dsumors/benchmark/benchmark.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
// MODULES //
2222

2323
var bench = require( '@stdlib/bench' );
24-
var uniform = require( '@stdlib/random/base/uniform' ).factory;
25-
var filledarrayBy = require( '@stdlib/array/filled-by' );
24+
var uniform = require( '@stdlib/random/array/uniform' );
2625
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2726
var pow = require( '@stdlib/math/base/special/pow' );
2827
var pkg = require( './../package.json' ).name;
@@ -31,7 +30,9 @@ var dsumors = require( './../lib/dsumors.js' );
3130

3231
// VARIABLES //
3332

34-
var rand = uniform( -100.0, 100.0 );
33+
var options = {
34+
'dtype': 'float64'
35+
};
3536

3637

3738
// FUNCTIONS //
@@ -44,7 +45,7 @@ var rand = uniform( -100.0, 100.0 );
4445
* @returns {Function} benchmark function
4546
*/
4647
function createBenchmark( len ) {
47-
var x = filledarrayBy( len, 'float64', rand );
48+
var x = uniform( len, -100, 100, options );
4849
return benchmark;
4950

5051
function benchmark( b ) {

lib/node_modules/@stdlib/blas/ext/base/dsumors/benchmark/benchmark.native.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222

2323
var resolve = require( 'path' ).resolve;
2424
var bench = require( '@stdlib/bench' );
25-
var uniform = require( '@stdlib/random/base/uniform' ).factory;
26-
var filledarrayBy = require( '@stdlib/array/filled-by' );
25+
var uniform = require( '@stdlib/random/array/uniform' );
2726
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2827
var pow = require( '@stdlib/math/base/special/pow' );
2928
var tryRequire = require( '@stdlib/utils/try-require' );
@@ -36,7 +35,9 @@ var dsumors = tryRequire( resolve( __dirname, './../lib/dsumors.native.js' ) );
3635
var opts = {
3736
'skip': ( dsumors instanceof Error )
3837
};
39-
var rand = uniform( -100.0, 100.0 );
38+
var options = {
39+
'dtype': 'float64'
40+
};
4041

4142

4243
// FUNCTIONS //
@@ -49,7 +50,7 @@ var rand = uniform( -100.0, 100.0 );
4950
* @returns {Function} benchmark function
5051
*/
5152
function createBenchmark( len ) {
52-
var x = filledarrayBy( len, 'float64', rand );
53+
var x = uniform( len, -100, 100, options );
5354
return benchmark;
5455

5556
function benchmark( b ) {

lib/node_modules/@stdlib/blas/ext/base/dsumors/benchmark/benchmark.ndarray.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
// MODULES //
2222

2323
var bench = require( '@stdlib/bench' );
24-
var uniform = require( '@stdlib/random/base/uniform' ).factory;
25-
var filledarrayBy = require( '@stdlib/array/filled-by' );
24+
var uniform = require( '@stdlib/random/array/uniform' );
2625
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2726
var pow = require( '@stdlib/math/base/special/pow' );
2827
var pkg = require( './../package.json' ).name;
@@ -31,7 +30,9 @@ var dsumors = require( './../lib/ndarray.js' );
3130

3231
// VARIABLES //
3332

34-
var rand = uniform( -100.0, 100.0 );
33+
var options = {
34+
'dtype': 'float64'
35+
};
3536

3637

3738
// FUNCTIONS //
@@ -44,7 +45,7 @@ var rand = uniform( -100.0, 100.0 );
4445
* @returns {Function} benchmark function
4546
*/
4647
function createBenchmark( len ) {
47-
var x = filledarrayBy( len, 'float64', rand );
48+
var x = uniform( len, -100, 100, options );
4849
return benchmark;
4950

5051
function benchmark( b ) {

0 commit comments

Comments
 (0)