Skip to content

Commit 98f5369

Browse files
committed
Auto-generated commit
1 parent 3cb7288 commit 98f5369

File tree

7 files changed

+37
-29
lines changed

7 files changed

+37
-29
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,7 @@ A total of 38 issues were closed in this release:
689689

690690
<details>
691691

692+
- [`5f0a844`](https://github.com/stdlib-js/stdlib/commit/5f0a844380510aaa97c8ca7d1b539868132ae2e7) - **refactor:** rename/reorder parameters _(by Athan Reines)_
692693
- [`f40ccb7`](https://github.com/stdlib-js/stdlib/commit/f40ccb75929e92538b8c366145589addccdaafbe) - **feat:** add `ndarray/base/ternary-loop-interchange-order` [(#9499)](https://github.com/stdlib-js/stdlib/pull/9499) _(by Muhammad Haris, Athan Reines)_
693694
- [`1f79854`](https://github.com/stdlib-js/stdlib/commit/1f798549409c47de0261c5396dccf64012e54a9c) - **feat:** add `ndarray/base/ternary-tiling-block-size` [(#9495)](https://github.com/stdlib-js/stdlib/pull/9495) _(by Muhammad Haris, Athan Reines)_
694695
- [`327cda9`](https://github.com/stdlib-js/stdlib/commit/327cda9b2dda086b20da9ce256df388573486946) - **feat:** update `ndarray` TypeScript declarations [(#9508)](https://github.com/stdlib-js/stdlib/pull/9508) _(by stdlib-bot)_

base/ternary-tiling-block-size/README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ limitations under the License.
4040
var ternaryBlockSize = require( '@stdlib/ndarray/base/ternary-tiling-block-size' );
4141
```
4242

43-
#### ternaryBlockSize( dtypeW, dtypeX, dtypeY, dtypeZ )
43+
#### ternaryBlockSize( dtypeX, dtypeY, dtypeZ, dtypeW )
4444

4545
Resolves a loop block size according to provided ndarray [dtypes][@stdlib/ndarray/dtypes] for multi-dimensional array tiled loops applying a ternary function.
4646

@@ -49,6 +49,13 @@ var bsize = ternaryBlockSize( 'float64', 'float64', 'float64', 'float64' );
4949
// returns <number>
5050
```
5151

52+
The function supports the following arguments:
53+
54+
- **dtypeX**: first input array data type.
55+
- **dtypeY**: second input array data type.
56+
- **dtypeZ**: third input array data type.
57+
- **dtypeW**: output array data type.
58+
5259
</section>
5360

5461
<!-- /.usage -->
@@ -86,7 +93,7 @@ var dt = cartesianPower( dtypes(), 3 );
8693
var t;
8794
var b;
8895
var i;
89-
console.log( 'block_size, wdtype, xdtype, ydtype, zdtype' );
96+
console.log( 'block_size, xdtype, ydtype, zdtype, wdtype' );
9097
for ( i = 0; i < dt.length; i++ ) {
9198
t = promotionRules.apply( null, dt[ i ] );
9299
dt[ i ].push( ( t === -1 ) ? 'generic' : t );

base/ternary-tiling-block-size/benchmark/benchmark.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ var blockSize = require( './../lib' );
2929
// MAIN //
3030

3131
bench( pkg, function benchmark( b ) {
32-
var dw;
3332
var dx;
3433
var dy;
3534
var dz;
35+
var dw;
3636
var s;
3737
var i;
3838

39-
dw = [
39+
dx = [
4040
'float64',
4141
'float32',
4242
'int8',
@@ -50,7 +50,7 @@ bench( pkg, function benchmark( b ) {
5050
'generic',
5151
'foobar'
5252
];
53-
dx = [
53+
dy = [
5454
'float64',
5555
'float32',
5656
'int8',
@@ -64,7 +64,7 @@ bench( pkg, function benchmark( b ) {
6464
'generic',
6565
'foobar'
6666
];
67-
dy = [
67+
dz = [
6868
'float64',
6969
'float32',
7070
'int8',
@@ -78,7 +78,7 @@ bench( pkg, function benchmark( b ) {
7878
'generic',
7979
'foobar'
8080
];
81-
dz = [
81+
dw = [
8282
'float64',
8383
'generic',
8484
'int32',
@@ -88,7 +88,7 @@ bench( pkg, function benchmark( b ) {
8888

8989
b.tic();
9090
for ( i = 0; i < b.iterations; i++ ) {
91-
s = blockSize( dw[ i%dw.length ], dx[ i%dx.length ], dy[ i%dy.length ], dz[ i%dz.length ] ); // eslint-disable-line max-len
91+
s = blockSize( dx[ i%dx.length ], dy[ i%dy.length ], dz[ i%dz.length ], dw[ i%dw.length ] ); // eslint-disable-line max-len
9292
if ( typeof s !== 'number' ) {
9393
b.fail( 'should return a number' );
9494
}

base/ternary-tiling-block-size/docs/repl.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11

2-
{{alias}}( dtypeW, dtypeX, dtypeY, dtypeZ )
2+
{{alias}}( dtypeX, dtypeY, dtypeZ, dtypeW )
33
Returns a loop block size for multi-dimensional array tiled loops.
44

55
Parameters
66
----------
7-
dtypeW: string|DataType
7+
dtypeX: string|DataType
88
First input array data type.
99

10-
dtypeX: string|DataType
10+
dtypeY: string|DataType
1111
Second input array data type.
1212

13-
dtypeY: string|DataType
13+
dtypeZ: string|DataType
1414
Third input array data type.
1515

16-
dtypeZ: string|DataType
16+
dtypeW: string|DataType
1717
Output array data type.
1818

1919
Returns

base/ternary-tiling-block-size/docs/types/index.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ import { DataType } from '@stdlib/types/ndarray';
2525
/**
2626
* Returns a loop block size for multi-dimensional array tiled loops.
2727
*
28-
* @param dtypeW - first input array data type
29-
* @param dtypeX - second input array data type
30-
* @param dtypeY - third input array data type
31-
* @param dtypeZ - output array data type
28+
* @param dtypeX - first input array data type
29+
* @param dtypeY - second input array data type
30+
* @param dtypeZ - third input array data type
31+
* @param dtypeW - output array data type
3232
* @returns block size (in units of elements)
3333
*
3434
* @example
3535
* var bsize = ternaryBlockSize( 'float64', 'float64', 'float64', 'float64' );
3636
* // returns <number>
3737
*/
38-
declare function ternaryBlockSize( dtypeW: DataType, dtypeX: DataType, dtypeY: DataType, dtypeZ: DataType ): number;
38+
declare function ternaryBlockSize( dtypeX: DataType, dtypeY: DataType, dtypeZ: DataType, dtypeW: DataType ): number;
3939

4040

4141
// EXPORTS //

base/ternary-tiling-block-size/examples/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ var dt = cartesianPower( dtypes(), 3 );
3030
var t;
3131
var b;
3232
var i;
33-
console.log( 'block_size, wdtype, xdtype, ydtype, zdtype' );
33+
console.log( 'block_size, xdtype, ydtype, zdtype, wdtype' );
3434
for ( i = 0; i < dt.length; i++ ) {
3535
t = promotionRules.apply( null, dt[ i ] );
3636
dt[ i ].push( ( t === -1 ) ? 'generic' : t );

base/ternary-tiling-block-size/lib/main.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,31 +29,31 @@ var defaults = require( './defaults.js' );
2929
/**
3030
* Returns a loop block size for multi-dimensional array tiled loops.
3131
*
32-
* @param {*} dtypeW - first input array data type
33-
* @param {*} dtypeX - second input array data type
34-
* @param {*} dtypeY - third input array data type
35-
* @param {*} dtypeZ - output array data type
32+
* @param {*} dtypeX - first input array data type
33+
* @param {*} dtypeY - second input array data type
34+
* @param {*} dtypeZ - third input array data type
35+
* @param {*} dtypeW - output array data type
3636
* @returns {integer} block size (in units of elements)
3737
*
3838
* @example
3939
* var bsize = ternaryBlockSize( 'float64', 'float64', 'float64', 'float64' );
4040
* // returns <number>
4141
*/
42-
function ternaryBlockSize( dtypeW, dtypeX, dtypeY, dtypeZ ) {
42+
function ternaryBlockSize( dtypeX, dtypeY, dtypeZ, dtypeW ) {
4343
var nbx;
4444
var nby;
4545
var nbz;
4646
var nbw;
4747
var max;
4848

49-
nbx = bytesPerElement( dtypeW );
50-
nby = bytesPerElement( dtypeX );
51-
nbz = bytesPerElement( dtypeY );
52-
nbw = bytesPerElement( dtypeZ );
49+
nbx = bytesPerElement( dtypeX );
50+
nby = bytesPerElement( dtypeY );
51+
nbz = bytesPerElement( dtypeZ );
52+
nbw = bytesPerElement( dtypeW );
5353
if ( nbx === null || nby === null || nbz === null || nbw === null ) { // e.g., "generic" arrays
5454
return defaults.BLOCK_SIZE_IN_ELEMENTS;
5555
}
56-
// Find the largest element size among all four arrays:
56+
// Find the largest element size among all four arrays...
5757
max = nbx;
5858
if ( nby > max ) {
5959
max = nby;

0 commit comments

Comments
 (0)