@stdlib/ndarray-base-nullary-tiling-block-size
v0.2.2
Published
Resolve a loop block size for multi-dimensional array tiled loops.
Downloads
33
Readme
nullaryBlockSize
Resolve a loop block size for multi-dimensional array tiled loops.
Installation
npm install @stdlib/ndarray-base-nullary-tiling-block-size
Usage
var nullaryBlockSize = require( '@stdlib/ndarray-base-nullary-tiling-block-size' );
nullaryBlockSize( dtypeX )
Resolves a loop block size according to provided ndarray dtypes for multi-dimensional array tiled loops applying a nullary function.
var bsize = nullaryBlockSize( 'float64' );
// returns <number>
Notes
- The returned loop tiling block size is in units of elements.
Examples
var dtypes = require( '@stdlib/ndarray-dtypes' );
var nullaryBlockSize = require( '@stdlib/ndarray-base-nullary-tiling-block-size' );
// Get the list of ndarray dtypes:
var dt = dtypes();
// Resolve the block size for each dtype...
var b;
var i;
console.log( 'block_size, xdtype' );
for ( i = 0; i < dt.length; i++ ) {
b = nullaryBlockSize( dt[ i ] );
console.log( '%d, %s', b, dt[ i ] );
}
Notice
This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
Community
License
See LICENSE.
Copyright
Copyright © 2016-2024. The Stdlib Authors.