8000 Auto-generated commit · stdlib-js/array-pool@523bf78 · GitHub
[go: up one dir, main page]

Skip to content

Commit 523bf78

Browse files
committed
Auto-generated commit
1 parent 721606b commit 523bf78

17 files changed

+699
-70
lines changed

.github/workflows/publish.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ jobs:
9494
# Replace branch in README.md link definitions for badges with the new version:
9595
find . -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/branch([=:])[^ ]+/branch\1v${NEW_VERSION}/g"
9696
97+
# Rewrite CHANGELOG.md to replace "Unreleased" with the new version:
98+
sed -Ei "s/Unreleased/${NEW_VERSION}/g" CHANGELOG.md
99+
sed -Ei "s/unreleased/v${NEW_VERSION}/g" CHANGELOG.md
100+
97101
# Create a new commit and tag:
98102
git add package.json README.md
99103
git commit -m "Release v${NEW_VERSION}"

CHANGELOG.md

Lines changed: 129 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,132 @@
22

33
> Package changelog.
44
5-
See [GitHub Releases](https://github.com/stdlib-js/array-pool/releases) for the changelog.
5+
<section class="release" id="unreleased">
6+
7+
## Unreleased (2024-07-01)
8+
9+
<section class="features">
10+
11+
### Features
12+
13+
- [`88cece6`](https://github.com/stdlib-js/stdlib/commit/88cece679d728150847dc2b5c957b395bffe7d90) - add boolean dtype support to `array/pool` [(#2486)](https://github.com/stdlib-js/stdlib/pull/2486)
14+
15+
</section>
16+
17+
<!-- /.features -->
18+
19+
<section class="commits">
20+
21+
### Commits
22+
23+
<details>
24+
25+
- [`88cece6`](https://github.com/stdlib-js/stdlib/commit/88cece679d728150847dc2b5c957b395bffe7d90) - **feat:** add boolean dtype support to `array/pool` [(#2486)](https://github.com/stdlib-js/stdlib/pull/2486) _(by Jaysukh Makvana, Athan Reines)_
26+
- [`75d4f83`](https://github.com/stdlib-js/stdlib/commit/75d4f83cb85610d23a04dc21a03f8075f6d3665f) - **refactor:** update require and include paths _(by Athan Reines)_
27+
28+
</details>
29+
30+
</section>
31+
32+
<!-- /.commits -->
33+
34+
<section class="contributors">
35+
36+
### Contributors
37+
38+
A total of 2 people contributed to this release. Thank you to the following contributors:
39+
40+
- Athan Reines
41+
- Jaysukh Makvana
42+
43+
</section>
44+
45+
<!-- /.contributors -->
46+
47+
</section>
48+
49+
<!-- /.release -->
50+
51+
<section class="release" id="v0.2.1">
52+
53+
## 0.2.1 (2024-02-25)
54+
55+
<section class="features">
56+
57+
### Features
58+
59+
- [`e25b23b`](https://github.com/stdlib-js/stdlib/commit/e25b23b917ee6e387722db7192d22e4a70222da0) - rename type definitions for array and ndarray data types
60+
- [`e29732d`](https://github.com/stdlib-js/stdlib/commit/e29732dee616e2d94e91f87f78afd8aceb806017) - update minimum TypeScript version
61+
62+
</section>
63+
64+
<!-- /.features -->
65+
66+
<section class="bug-fixes">
67+
68+
### Bug Fixes
69+
70+
- [`80e9e9a`](https://github.com/stdlib-js/stdlib/commit/80e9e9a3874cf073bf2c2aea9b06e7a8973c676c) - update accessor resolution
71+
72+
</section>
73+
74+
<!-- /.bug-fixes -->
75+
76+
<section class="breaking-changes">
77+
78+
### BREAKING CHANGES
79+
80+
- [`e25b23b`](https://github.com/stdlib-js/stdlib/commit/e25b23b917ee6e387722db7192d22e4a70222da0): rename type definitions for array and ndarray data types
81+
- [`e25b23b`](https://github.com/stdlib-js/stdlib/commit/e25b23b917ee6e387722db7192d22e4a70222da0): rename type definitions for array and ndarray data types
82+
83+
- In order to migrate, users should update their implementations to
84+
use the latest naming conventions. The affected type definitions
85+
are aliases for individual data type strings, so their should be
86+
no behavioral changes.
87+
88+
- [`e29732d`](https://github.com/stdlib-js/stdlib/commit/e29732dee616e2d94e91f87f78afd8aceb806017): update minimum TypeScript version
89+
- [`e29732d`](https://github.com/stdlib-js/stdlib/commit/e29732dee616e2d94e91f87f78afd8aceb806017): update minimum TypeScript version to 4.1
90+
91+
- To migrate, users should upgrade their TypeScript version to at least version 4.1.
92+
93+
</section>
94+
95+
<!-- /.breaking-changes -->
96+
97+
<section class="commits">
98+
99+
### Commits
100+
101+
<details>
102+
103+
- [`80e9e9a`](https://github.com/stdlib-js/stdlib/commit/80e9e9a3874cf073bf2c2aea9b06e7a8973c676c) - **fix:** update accessor resolution _(by Athan Reines)_
104+
- [`b9a7a49`](https://github.com/stdlib-js/stdlib/commit/b9a7a492fe0999423a025151f00268281c25f4f5) - **refactor:** query default dtype _(by Athan Reines)_
105+
- [`e25b23b`](https://github.com/stdlib-js/stdlib/commit/e25b23b917ee6e387722db7192d22e4a70222da0) - **feat:** rename type definitions for array and ndarray data types _(by Athan Reines)_
106+
- [`bcb4079`](https://github.com/stdlib-js/stdlib/commit/bcb4079adf3e31d33d28db5dff21558c9e6bd5be) - **build:** remove and replace tslint directives _(by Philipp Burckhardt)_
107+
- [`9502ed2`](https://github.com/stdlib-js/stdlib/commit/9502ed27e2853e312c556a48bdd7775095e66709) - **build:** replace tslint directive with eslint equivalent _(by Philipp Burckhardt)_
108+
- [`e29732d`](https://github.com/stdlib-js/stdlib/commit/e29732dee616e2d94e91f87f78afd8aceb806017) - **feat:** update minimum TypeScript version _(by Philipp Burckhardt)_
109+
- [`43b454e`](https://github.com/stdlib-js/stdlib/commit/43b454ef52b9aba92242d95e05d82c3952715368) - **refactor:** avoid usage of utils/copy _(by Philipp Burckhardt)_
110+
111+
</details>
112+
113+
</section>
114+
115+
<!-- /.commits -->
116+
117+
<section class="contributors">
118+
119+
### Contributors
120+
121+
A total of 2 people contributed to this release. Thank you to the following contributors:
122+
123+
- Athan Reines
124+
- Philipp Burckhardt
125+
126+
</section>
127+
128+
<!-- /.contributors -->
129+
130+
</section>
131+
132+
<!-- /.release -->
133+

CONTRIBUTORS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ Pushpendra Chandravanshi <pushpendrachandravanshi4@gmail.com>
6363
Raunak Kumar Gupta <raunakmodanwal321@gmail.com>
6464
Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
6565
Ricky Reusser <rsreusser@gmail.com>
66+
Ridam Garg <67867319+RidamGarg@users.noreply.github.com>
6667
Robert Gislason <gztown2216@yahoo.com>
6768
Roman Stetsyk <25715951+romanstetsyk@users.noreply.github.com>
6869
Rutam <138517416+performant23@users.noreply.github.com>
@@ -75,7 +76,7 @@ Shraddheya Shendre <shendreshraddheya@gmail.com>
7576
Shubh Mehta <93862397+Shubh942@users.noreply.github.com>
7677
Shubham Mishra <shubh622005@gmail.com>
7778
Sivam Das <100067002+Sivam2313@users.noreply.github.com>
78-
Snehil Shah <130062020+Snehil-Shah@users.noreply.github.com>
79+
Snehil Shah <snehilshah.989@gmail.com>
7980
Soumajit Chatterjee <121816890+soumajit23@users.noreply.github.com>
8081
Spandan Barve <contact@marsian.dev>
8182
Stephannie Jiménez Gacha <steff456@hotmail.com>

README.md

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
@license Apache-2.0
44
5-
Copyright (c) 2018 The Stdlib Authors.
5+
Copyright (c) 2024 The Stdlib Authors.
66
77
Licensed under the Apache License, Version 2.0 (the "License");
88
you may not use this file except in compliance with the License.
@@ -29,7 +29,7 @@ limitations under the License.
2929
<p>To join us in bringing numerical computing to the web, get started by checking us out on <a href="https://github.com/stdlib-js/stdlib">GitHub</a>, and please consider <a href="https://opencollective.com/stdlib">financially supporting stdlib</a>. We greatly appreciate your continued support!</p>
3030
</details>
3131

32-
# Typed Array Pool
32+
# typedarraypool
3333

3434
[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] <!-- [![dependencies][dependencies-image]][dependencies-url] -->
3535

@@ -75,7 +75,7 @@ var typedarraypool = require( '@stdlib/array-pool' );
7575

7676
#### typedarraypool( \[dtype] )
7777

78-
Returns an **uninitialized** [typed array][mdn-typed-array] having a specified data type `dtype`.
78+
Returns an **uninitialized** [typed array][mdn-typed-array] having a specified [data type][@stdlib/array/typed-dtypes] `dtype`.
7979

8080
```javascript
8181
var arr = typedarraypool();
@@ -86,21 +86,7 @@ var arr = typedarraypool();
8686
typedarraypool.free( arr );
8787
```
8888

89-
The function recognizes the following data types:
90-
91-
- `float64`: double-precision floating-point numbers (IEEE 754)
92-
- `float32`: single-precision floating-point numbers (IEEE 754)
93-
- `complex128`: double-precision complex floating-point numbers
94-
- `complex64`: single-precision complex floating-point numbers
95-
- `int32`: 32-bit two's complement signed integers
96-
- `uint32`: 32-bit unsigned integers
97-
- `int16`: 16-bit two's complement signed integers
98-
- `uint16`: 16-bit unsigned integers
99-
- `int8`: 8-bit two's complement signed integers
100-
- `uint8`: 8-bit unsigned integers
101-
- `uint8c`: 8-bit unsigned integers clamped to `0-255`
102-
103-
By default, the output [typed array][mdn-typed-array] is `float64`. To specify an alternative data type, set the `dtype` parameter.
89+
By default, the output [typed array][mdn-typed-array] is `float64`. To specify an alternative [data type][@stdlib/array/typed-dtypes], set the `dtype` parameter.
10490

10591
```javascript
10692
var arr = typedarraypool( 'int32' );
@@ -168,7 +154,7 @@ typedarraypool.free( arr2 );
168154

169155
#### typedarraypool.malloc( \[dtype] )
170156

171-
Returns an **uninitialized** [typed array][mdn-typed-array] having a specified data type `dtype`.
157+
Returns an **uninitialized** [typed array][mdn-typed-array] having a specified [data type][@stdlib/array/typed-dtypes] `dtype`.
172158

173159
```javascript
174160
var arr1 = typedarraypool.malloc();
@@ -240,7 +226,7 @@ typedarraypool.free( arr2 );
240226

241227
#### typedarraypool.calloc( \[dtype] )
242228

243-
Returns a **zero-initialized** [typed array][mdn-typed-array] having a specified data type `dtype`.
229+
Returns a **zero-initialized** [typed array][mdn-typed-array] having a specified [data type][@stdlib/array/typed-dtypes] `dtype`.
244230

245231
```javascript
246232
var arr1 = typedarraypool.calloc();
@@ -562,6 +548,8 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
562548

563549
[mdn-arraybuffer]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer
564550

551+
[@stdlib/array/typed-dtypes]: https://github.com/stdlib-js/array-typed-dtypes
552+
565553
<!-- <related-links> -->
566554

567555
[@stdlib/array/typed]: https://github.com/stdlib-js/array-typed

benchmark/benchmark.calloc.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2018 The Stdlib Authors.
4+
* Copyright (c) 2024 The Stdlib Authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@
2323
var bench = require( '@stdlib/bench-harness' );
2424
var isTypedArray = require( '@stdlib/assert-is-typed-array' );
2525
var isComplexTypedArray = require( '@stdlib/assert-is-complex-typed-array' );
26+
var isBooleanArray = require( '@stdlib/assert-is-booleanarray' );
2627
var pkg = require( './../package.json' ).name;
2728
var typedarray = require( './../lib' );
2829

@@ -209,6 +210,24 @@ bench( pkg+':calloc:dtype=uint8c', function benchmark( b ) {
209210
b.end();
210211
});
211212

213+
bench( pkg+':calloc:dtype=bool', function benchmark( b ) {
214+
var arr;
215+
var i;
216+
b.tic();
217+
for ( i = 0; i < b.iterations; i++ ) {
218+
arr = typedarray.calloc( 0, 'bool' );
219+
if ( arr.length !== 0 ) {
220+
b.fail( 'should have length 0' );
221+
}
222+
}
223+
b.toc();
224+
if ( !isBooleanArray( arr ) ) {
225+
b.fail( 'should return a boolean array' );
226+
}
227+
b.pass( 'benchmark finished' );
228+
b.end();
229+
});
230+
212231
bench( pkg+':calloc:dtype=complex64', function benchmark( b ) {
213232
var arr;
214233
var i;

benchmark/benchmark.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2018 The Stdlib Authors.
4+
* Copyright (c) 2024 The Stdlib Authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@
2323
var bench = require( '@stdlib/bench-harness' );
2424
var isTypedArray = require( '@stdlib/assert-is-typed-array' );
2525
var isComplexTypedArray = require( '@stdlib/assert-is-complex-typed-array' );
26+
var isBooleanArray = require('@stdlib/assert-is-booleanarray');
2627
var pkg = require( './../package.json' ).name;
2728
var typedarray = require( './../lib' );
2829

@@ -209,6 +210,24 @@ bench( pkg+':dtype=uint8c', function benchmark( b ) {
209210
b.end();
210211
});
211212

213+
bench( pkg+':dtype=bool', function benchmark( b ) {
214+
var arr;
215+
var i;
216+
b.tic();
217+
for ( i = 0; i < b.iterations; i++ ) {
218+
arr = typedarray( 0, 'bool' );
219+
if ( arr.length !== 0 ) {
220+
b.fail( 'should have length 0' );
221+
}
222+
}
223+
b.toc();
224+
if ( !isBooleanArray( arr ) ) {
225+
b.fail( 'should return a boolean array' );
226+
}
227+
b.pass( 'benchmark finished' );
228+
b.end();
229+
});
230+
212231
bench( pkg+':dtype=complex64', function benchmark( b ) {
213232
var arr;
214233
var i;

0 commit comments

Comments
 (0)
0