JSPM

@stdlib/ndarray-base-unary-tiling-block-size

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 106
  • Score
    100M100P100Q101355F
  • License Apache-2.0

Resolve a loop block size for multi-dimensional array tiled loops.

Package Exports

  • @stdlib/ndarray-base-unary-tiling-block-size
  • @stdlib/ndarray-base-unary-tiling-block-size/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@stdlib/ndarray-base-unary-tiling-block-size) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

unaryBlockSize

NPM version Build Status Coverage Status

Resolve a loop block size for multi-dimensional array tiled loops.

Installation

npm install @stdlib/ndarray-base-unary-tiling-block-size

Usage

var unaryBlockSize = require( '@stdlib/ndarray-base-unary-tiling-block-size' );

unaryBlockSize( dtypeX, dtypeY )

Resolves a loop block size according to provided ndarray dtypes for multi-dimensional array tiled loops applying a unary function.

var bsize = unaryBlockSize( 'float64', 'float64' );
// returns <number>

Notes

  • The returned loop tiling block size is in units of elements.

Examples

var dtypes = require( '@stdlib/ndarray-dtypes' );
var cartesianSquare = require( '@stdlib/array-base-cartesian-square' );
var unaryBlockSize = require( '@stdlib/ndarray-base-unary-tiling-block-size' );

// Generate a list of ndarray dtype pairs:
var dt = cartesianSquare( dtypes() );

// Resolve the block size for each dtype pair...
var b;
var i;
for ( i = 0; i < dt.length; i++ ) {
    b = unaryBlockSize.apply( null, dt[ i ] );
    console.log( '%d, %s, %s', b, dt[i][0], dt[i][1] );
}

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

Chat


License

See LICENSE.

Copyright © 2016-2023. The Stdlib Authors.