Skip to content

Commit e95d4df

Browse files
committed
Auto-generated commit
1 parent 830b111 commit e95d4df

File tree

12 files changed

+183
-239
lines changed

12 files changed

+183
-239
lines changed

.github/.keepalive

Lines changed: 0 additions & 1 deletion
This file was deleted.

CHANGELOG.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,27 @@
44
55
<section class="release" id="unreleased">
66

7-
## Unreleased (2024-09-01)
7+
## Unreleased (2024-09-29)
8+
9+
<section class="issues">
10+
11+
### Closed Issues
12+
13+
This release closes the following issue:
14+
15+
[#1536](https://github.com/stdlib-js/stdlib/issues/1536)
16+
17+
</section>
18+
19+
<!-- /.issues -->
820

921
<section class="commits">
1022

1123
### Commits
1224

1325
<details>
1426

27+
- [`b57ae2e`](https://github.com/stdlib-js/stdlib/commit/b57ae2e52609433b1d07e0384a1c724a7308f401) - **refactor:** updated `blas/ext/base/ssort2sh` to follow current project conventions [(#2957)](https://github.com/stdlib-js/stdlib/pull/2957) _(by Aayush Khanna, Philipp Burckhardt)_
1528
- [`272ae7a`](https://github.com/stdlib-js/stdlib/commit/272ae7ac5c576c68cfab1b6e304c86407faa20cd) - **docs:** remove comment _(by Athan Reines)_
1629

1730
</details>
@@ -24,9 +37,11 @@
2437

2538
### Contributors
2639

27-
A total of 1 person contributed to this release. Thank you to this contributor:
40+
A total of 3 people contributed to this release. Thank you to the following contributors:
2841

42+
- Aayush Khanna
2943
- Athan Reines
44+
- Philipp Burckhardt
3045

3146
</section>
3247

CONTRIBUTORS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#
33
# Contributors listed in alphabetical order.
44

5+
Aayush Khanna <96649223+aayush0325@users.noreply.github.com>
56
Adarsh Palaskar <adarshpalaskar99@gmail.com>
67
Aditya Sapra <adityaework@gmail.com>
78
AgPriyanshu18 <113460573+AgPriyanshu18@users.noreply.github.com>
@@ -20,23 +21,27 @@ Christopher Dambamuromo <chridam@gmail.com>
2021
Dan Rose <danoftheroses@gmail.com>
2122
Daniel Killenberger <daniel.killenberger@gmail.com>
2223
Daniel Yu <40680511+Daniel777y@users.noreply.github.com>
24+
Debashis Maharana <debashismaharana7854@gmail.com>
2325
Dominik Moritz <domoritz@gmail.com>
2426
Dorrin Sotoudeh <dorrinsotoudeh123@gmail.com>
2527
EuniceSim142 <77243938+EuniceSim142@users.noreply.github.com>
2628
Frank Kovacs <fran70kk@gmail.com>
2729
Golden Kumar <103646877+AuenKr@users.noreply.github.com>
2830
Gunj Joshi <gunjjoshi8372@gmail.com>
31+
HarshaNP <96897754+GittyHarsha@users.noreply.github.com>
2932
Harshita Kalani <harshitakalani02@gmail.com>
3033
Hridyanshu <124202756+HRIDYANSHU054@users.noreply.github.com>
3134
Jaimin Godhani <112328542+Jai0401@users.noreply.github.com>
3235
James Gelok <jdgelok@gmail.com>
3336
Jaysukh Makvana <jaysukhmakvana2004@gmail.com>
37+
Jenish Thapa <141203631+jenish-thapa@users.noreply.github.com>
3438
Jithin KS <jithinks112@gmail.com>
3539
Joel Mathew Koshy <joelmathewkoshy@gmail.com>
3640
Joey Reed <joeyrreed@gmail.com>
3741
Jordan Gallivan <115050475+Jordan-Gallivan@users.noreply.github.com>
3842
Joris Labie <joris.labie1@gmail.com>
3943
Justin Dennison <justin1dennison@gmail.com>
44+
Kaif Mohd <mdkaifprofession@gmail.com>
4045
Karthik Prakash <116057817+skoriop@users.noreply.github.com>
4146
Khaldon <kahmd1444@gmail.com>
4247
Krishnendu Das <86651039+itskdhere@users.noreply.github.com>
@@ -86,13 +91,17 @@ Stephannie Jiménez Gacha <steff456@hotmail.com>
8691
Suraj kumar <125961509+kumarsuraj212003@users.noreply.github.com>
8792
Tirtadwipa Manunggal <tirtadwipa.manunggal@gmail.com>
8893
Tudor Pagu <104032457+tudor-pagu@users.noreply.github.com>
94+
Tufailahmed Bargir <142114244+Tufailahmed-Bargir@users.noreply.github.com>
8995
Utkarsh <http://utkarsh11105@gmail.com>
9096
Utkarsh Raj <rajutkarsh2505@gmail.com>
97+
Vaibhav Patel <98279986+noobCoderVP@users.noreply.github.com>
9198
Varad Gupta <varadgupta21@gmail.com>
9299
Xiaochuan Ye <tap91624@gmail.com>
93100
Yernar Yergaziyev <yernar.yergaziyev@erg.kz>
94101
naveen <stupiddint@gmail.com>
95102
nishant-s7 <97207366+nishant-s7@users.noreply.github.com>
103+
olenkabilonizhka <62379231+olenkabilonizhka@users.noreply.github.com>
96104
orimiles5 <97595296+orimiles5@users.noreply.github.com>
97105
rainn <88160429+AmCodesLame@users.noreply.github.com>
98106
rei2hu <reimu@reimu.ws>
107+
yaswanth <116426380+yaswanthkosuru@users.noreply.github.com>

README.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -91,17 +91,15 @@ The function has the following parameters:
9191
- **y**: second input [`Float32Array`][@stdlib/array/float32].
9292
- **strideY**: `y` index increment.
9393

94-
The `N` and `stride` parameters determine which elements in `x` and `y` are accessed at runtime. For example, to sort every other element
94+
The `N` and stride parameters determine which elements in the strided arrays are accessed at runtime. For example, to sort every other element
9595

9696
```javascript
9797
var Float32Array = require( '@stdlib/array-float32' );
98-
var floor = require( '@stdlib/math-base-special-floor' );
9998

10099
var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0 ] );
101100
var y = new Float32Array( [ 0.0, 1.0, 2.0, 3.0 ] );
102-
var N = floor( x.length / 2 );
103101

104-
ssort2sh( N, -1.0, x, 2, y, 2 );
102+
ssort2sh( 2, -1.0, x, 2, y, 2 );
105103

106104
console.log( x );
107105
// => <Float32Array>[ 3.0, -2.0, 1.0, -4.0 ]
@@ -114,7 +112,6 @@ Note that indexing is relative to the first index. To introduce an offset, use [
114112

115113
```javascript
116114
var Float32Array = require( '@stdlib/array-float32' );
117-
var floor = require( '@stdlib/math-base-special-floor' );
118115

119116
// Initial arrays...
120117
var x0 = new Float32Array( [ 1.0, 2.0, 3.0, 4.0 ] );
@@ -123,10 +120,9 @@ var y0 = new Float32Array( [ 0.0, 1.0, 2.0, 3.0 ] );
123120
// Create offset views...
124121
var x1 = new Float32Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
125122
var y1 = new Float32Array( y0.buffer, y0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
126-
var N = floor( x0.length/2 );
127123

128124
// Sort every other element...
129-
ssort2sh( N, -1.0, x1, 2, y1, 2 );
125+
ssort2sh( 2, -1.0, x1, 2, y1, 2 );
130126

131127
console.log( x0 );
132128
// => <Float32Array>[ 1.0, 4.0, 3.0, 2.0 ]
@@ -159,7 +155,7 @@ The function has the following additional parameters:
159155
- **offsetX**: `x` starting index.
160156
- **offsetY**: `y` starting index.
161157

162-
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 `x`
158+
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 `x`
163159

164160
```javascript
165161
var Float32Array = require( '@stdlib/array-float32' );
@@ -210,12 +206,10 @@ var ssort2sh = require( '@stdlib/blas-ext-base-ssort2sh' );
210206

211207
var rand;
212208
var sign;
213-
var x;
214-
var y;
215209
var i;
216210

217-
x = new Float32Array( 10 );
218-
y = new Float32Array( 10 ); // index array
211+
var x = new Float32Array( 10 );
212+
var y = new Float32Array( 10 ); // index array
219213
for ( i = 0; i < x.length; i++ ) {
220214
rand = round( randu()*100.0 );
221215
sign = randu();

docs/repl.txt

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
Simultaneously sorts two single-precision floating-point strided arrays
44
based on the sort order of the first array using Shellsort.
55

6-
The `N` and `stride` parameters determine which elements in `x` and `y` are
7-
accessed at runtime.
6+
The `N` and stride parameters determine which elements in the strided arrays
7+
are accessed at runtime.
88

99
Indexing is relative to the first index. To introduce an offset, use typed
1010
array views.
@@ -67,11 +67,10 @@
6767
> y
6868
<Float32Array>[ 3.0, 1.0, 0.0, 2.0 ]
6969

70-
// Using `N` and `stride` parameters:
70+
// Using `N` and stride parameters:
7171
> x = new {{alias:@stdlib/array/float32}}( [ 1.0, -2.0, 3.0, -4.0 ] );
7272
> y = new {{alias:@stdlib/array/float32}}( [ 0.0, 1.0, 2.0, 3.0 ] );
73-
> var N = {{alias:@stdlib/math/base/special/floor}}( x.length / 2 );
74-
> {{alias}}( N, -1, x, 2, y, 2 )
73+
> {{alias}}( 2, -1, x, 2, y, 2 )
7574
<Float32Array>[ 3.0, -2.0, 1.0, -4.0 ]
7675
> y
7776
<Float32Array>[ 2.0, 1.0, 0.0, 3.0 ]
@@ -81,22 +80,22 @@
8180
> var x1 = new {{alias:@stdlib/array/float32}}( x0.buffer, x0.BYTES_PER_ELEMENT*1 );
8281
> var y0 = new {{alias:@stdlib/array/float32}}( [ 0.0, 1.0, 2.0, 3.0 ] );
8382
> var y1 = new {{alias:@stdlib/array/float32}}( y0.buffer, y0.BYTES_PER_ELEMENT*1 );
84-
> N = {{alias:@stdlib/math/base/special/floor}}( x0.length / 2 );
85-
> {{alias}}( N, 1, x1, 2, y1, 2 )
83+
> {{alias}}( 2, 1, x1, 2, y1, 2 )
8684
<Float32Array>[ -4.0, 3.0, -2.0 ]
8785
> x0
8886
<Float32Array>[ 1.0, -4.0, 3.0, -2.0 ]
8987
> y0
9088
<Float32Array>[ 0.0, 3.0, 2.0, 1.0 ]
9189

90+
9291
{{alias}}.ndarray( N, order, x, strideX, offsetX, y, strideY, offsetY )
9392
Simultaneously sorts two single-precision floating-point strided arrays
9493
based on the sort order of the first array using Shellsort and alternative
9594
indexing semantics.
9695

9796
While typed array views mandate a view offset based on the underlying
98-
buffer, the `offset` parameter supports indexing semantics based on a
99-
starting index.
97+
buffer, the offset parameter supports indexing semantics based on a starting
98+
index.
10099

101100
Parameters
102101
----------
@@ -143,8 +142,7 @@
143142
// Using an index offset:
144143
> x = new {{alias:@stdlib/array/float32}}( [ 1.0, -2.0, 3.0, -4.0 ] );
145144
> y = new {{alias:@stdlib/array/float32}}( [ 0.0, 1.0, 2.0, 3.0 ] );
146-
> var N = {{alias:@stdlib/math/base/special/floor}}( x.length / 2 );
147-
> {{alias}}.ndarray( N, 1, x, 2, 1, y, 2, 1 )
145+
> {{alias}}.ndarray( 2, 1, x, 2, 1, y, 2, 1 )
148146
<Float32Array>[ 1.0, -4.0, 3.0, -2.0 ]
149147
> y
150148
<Float32Array>[ 0.0, 3.0, 2.0, 1.0 ]

docs/types/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ interface Routine {
8585
* @param N - number of indexed elements
8686
* @param order - sort order
8787
* @param x - first input array
88-
* @param strideX - `x` stride length
88+
* @param strideX - first stride length
8989
* @param y - second input array
90-
* @param strideY - `y` stride length
90+
* @param strideY - second stride length
9191
* @returns `x`
9292
*
9393
* @example

examples/index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,10 @@ var ssort2sh = require( './../lib' );
2525

2626
var rand;
2727
var sign;
28-
var x;
29-
var y;
3028
var i;
3129

32-
x = new Float32Array( 10 );
33-
y = new Float32Array( 10 ); // index array
30+
var x = new Float32Array( 10 );
31+
var y = new Float32Array( 10 ); // index array
3432
for ( i = 0; i < x.length; i++ ) {
3533
if ( randu() < 0.2 ) {
3634
x[ i ] = NaN;

include.gypi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Source files:
3838
'src_files': [
39-
'<(src_dir)/addon.cpp',
39+
'<(src_dir)/addon.c',
4040
'<!@(node -e "var arr = require(\'@stdlib/utils-library-manifest\')(\'./manifest.json\',{},{\'basedir\':process.cwd(),\'paths\':\'posix\'}).src; for ( var i = 0; i < arr.length; i++ ) { console.log( arr[ i ] ); }")',
4141
],
4242

manifest.json

Lines changed: 83 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,85 @@
11
{
2-
"options": {},
3-
"fields": [
4-
{
5-
"field": "src",
6-
"resolve": true,
7-
"relative": true
8-
},
9-
{
10-
"field": "include",
11-
"resolve": true,
12-
"relative": true
13-
},
14-
{
15-
"field": "libraries",
16-
"resolve": false,
17-
"relative": false
18-
},
19-
{
20-
"field": "libpath",
21-
"resolve": true,
22-
"relative": false
23-
}
24-
],
25-
"confs": [
26-
{
27-
"src": [
28-
"./src/ssort2sh.c"
29-
],
30-
"include": [
31-
"./include"
32-
],
33-
"libraries": [
34-
"-lm"
35-
],
36-
"libpath": [],
37-
"dependencies": [
38-
"@stdlib/math-base-assert-is-nanf",
39-
"@stdlib/math-base-assert-is-negative-zerof"
40-
]
41-
}
42-
]
2+
"options": {
3+
"task": "build"
4+
},
5+
"fields": [
6+
{
7+
"field": "src",
8+
"resolve": true,
9+
"relative": true
10+
},
11+
{
12+
"field": "include",
13+
"resolve": true,
14+
"relative": true
15+
},
16+
{
17+
"field": "libraries",
18+
"resolve": false,
19+
"relative": false
20+
},
21+
{
22+
"field": "libpath",
23+
"resolve": true,
24+
"relative": false
25+
}
26+
],
27+
"confs": [
28+
{
29+
"task": "build",
30+
"src": [
31+
"./src/ssort2sh.c"
32+
],
33+
"include": [
34+
"./include"
35+
],
36+
"libraries": [
37+
"-lm"
38+
],
39+
"libpath": [],
40+
"dependencies": [
41+
"@stdlib/math-base-assert-is-nanf",
42+
"@stdlib/math-base-assert-is-negative-zerof",
43+
"@stdlib/napi-export",
44+
"@stdlib/napi-argv",
45+
"@stdlib/napi-argv-float",
46+
"@stdlib/napi-argv-int64",
47+
"@stdlib/napi-argv-strided-float32array"
48+
]
49+
},
50+
{
51+
"task": "benchmark",
52+
"src": [
53+
"./src/ssort2sh.c"
54+
],
55+
"include": [
56+
"./include"
57+
],
58+
"libraries": [
59+
"-lm"
60+
],
61+
"libpath": [],
62+
"dependencies": [
63+
"@stdlib/math-base-assert-is-nanf",
64+
"@stdlib/math-base-assert-is-negative-zerof"
65+
]
66+
},
67+
{
68+
"task": "examples",
69+
"src": [
70+
"./src/ssort2sh.c"
71+
],
72+
"include": [
73+
"./include"
74+
],
75+
"libraries": [
76+
"-lm"
77+
],
78+
"libpath": [],
79+
"dependencies": [
80+
"@stdlib/math-base-assert-is-nanf",
81+
"@stdlib/math-base-assert-is-negative-zerof"
82+
]
83+
}
84+
]
4385
}

0 commit comments

Comments
 (0)