Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,328 @@

{{alias}}( ndims )
Returns a kernel for applying a one-dimensional strided array reduction
function to an input ndarray and assigning results to an output ndarray.

The returned function has the following parameters:

- fcn: wrapper for a one-dimensional strided array reduction function.
- arrays: array containing one input ndarray descriptor and one output
ndarray descriptor, followed by any additional ndarray arguments.
- views: initialized ndarray descriptors representing subarray views.
- strides: loop dimension strides for the input ndarray.
- strategy: input ndarray reshape strategy.
- options: function options which are passed through to `fcn`.

If `ndims` is greater than the maximum supported number of loop dimensions,
the function returns `null`.

Parameters
----------
ndims: integer
Number of loop dimensions.

Returns
-------
fcn: Function|null
Kernel function.

Examples
--------
> var f = {{alias}}( 2 )
<Function>


{{alias}}.kernel0d( fcn, arr, views, sx, strategy, opts )
Performs a reduction over a list of specified dimensions in an input ndarray
and assigns results to a provided output ndarray.

The `views` and `sx` parameters are unused. Providing empty arrays for these
parameters is recommended in order to ensure a monomorphic API.

Parameters
----------
fcn: Function
Wrapper for a one-dimensional strided array reduction function.

arr: Array<Object>
Array containing one input ndarray descriptor and one output ndarray
descriptor, followed by any additional ndarray arguments.

views: Array<Object>
Initialized ndarray descriptors representing subarray views.

sx: Array<integer>
Loop dimension strides for the input ndarray. Should have zero elements.

strategy: Function
Input ndarray reshape strategy.

opts: Object
Function options which are passed through to `fcn`.


{{alias}}.kernel1d( fcn, arr, views, sx, strategy, opts )
Performs a reduction over an input ndarray and assigns results to a provided
output ndarray.

Parameters
----------
fcn: Function
Wrapper for a one-dimensional strided array reduction function.

arr: Array<Object>
Array containing one input ndarray descriptor and one output ndarray
descriptor, followed by any additional ndarray arguments.

views: Array<Object>
Initialized ndarray descriptors representing subarray views.

sx: Array<integer>
Loop dimension strides for the input ndarray. Should have one element.

strategy: Function
Input ndarray reshape strategy.

opts: Object
Function options which are passed through to `fcn`.


{{alias}}.kernel2d( fcn, arr, views, sx, strategy, opts )
Performs a reduction over an input ndarray and assigns results to a provided
output ndarray.

Parameters
----------
fcn: Function
Wrapper for a one-dimensional strided array reduction function.

arr: Array<Object>
Array containing one input ndarray descriptor and one output ndarray
descriptor, followed by any additional ndarray arguments.

views: Array<Object>
Initialized ndarray descriptors representing subarray views.

sx: Array<integer>
Loop dimension strides for the input ndarray. Should have two elements.

strategy: Function
Input ndarray reshape strategy.

opts: Object
Function options which are passed through to `fcn`.


{{alias}}.kernel3d( fcn, arr, views, sx, strategy, opts )
Performs a reduction over an input ndarray and assigns results to a provided
output ndarray.

Parameters
----------
fcn: Function
Wrapper for a one-dimensional strided array reduction function.

arr: Array<Object>
Array containing one input ndarray descriptor and one output ndarray
descriptor, followed by any additional ndarray arguments.

views: Array<Object>
Initialized ndarray descriptors representing subarray views.

sx: Array<integer>
Loop dimension strides for the input ndarray. Should have three
elements.

strategy: Function
Input ndarray reshape strategy.

opts: Object
Function options which are passed through to `fcn`.


{{alias}}.kernel4d( fcn, arr, views, sx, strategy, opts )
Performs a reduction over an input ndarray and assigns results to a provided
output ndarray.

Parameters
----------
fcn: Function
Wrapper for a one-dimensional strided array reduction function.

arr: Array<Object>
Array containing one input ndarray descriptor and one output ndarray
descriptor, followed by any additional ndarray arguments.

views: Array<Object>
Initialized ndarray descriptors representing subarray views.

sx: Array<integer>
Loop dimension strides for the input ndarray. Should have four elements.

strategy: Function
Input ndarray reshape strategy.

opts: Object
Function options which are passed through to `fcn`.


{{alias}}.kernel5d( fcn, arr, views, sx, strategy, opts )
Performs a reduction over an input ndarray and assigns results to a provided
output ndarray.

Parameters
----------
fcn: Function
Wrapper for a one-dimensional strided array reduction function.

arr: Array<Object>
Array containing one input ndarray descriptor and one output ndarray
descriptor, followed by any additional ndarray arguments.

views: Array<Object>
Initialized ndarray descriptors representing subarray views.

sx: Array<integer>
Loop dimension strides for the input ndarray. Should have five elements.

strategy: Function
Input ndarray reshape strategy.

opts: Object
Function options which are passed through to `fcn`.


{{alias}}.kernel6d( fcn, arr, views, sx, strategy, opts )
Performs a reduction over an input ndarray and assigns results to a provided
output ndarray.

Parameters
----------
fcn: Function
Wrapper for a one-dimensional strided array reduction function.

arr: Array<Object>
Array containing one input ndarray descriptor and one output ndarray
descriptor, followed by any additional ndarray arguments.

views: Array<Object>
Initialized ndarray descriptors representing subarray views.

sx: Array<integer>
Loop dimension strides for the input ndarray. Should have six elements.

strategy: Function
Input ndarray reshape strategy.

opts: Object
Function options which are passed through to `fcn`.


{{alias}}.kernel7d( fcn, arr, views, sx, strategy, opts )
Performs a reduction over an input ndarray and assigns results to a provided
output ndarray.

Parameters
----------
fcn: Function
Wrapper for a one-dimensional strided array reduction function.

arr: Array<Object>
Array containing one input ndarray descriptor and one output ndarray
descriptor, followed by any additional ndarray arguments.

views: Array<Object>
Initialized ndarray descriptors representing subarray views.

sx: Array<integer>
Loop dimension strides for the input ndarray. Should have seven
elements.

strategy: Function
Input ndarray reshape strategy.

opts: Object
Function options which are passed through to `fcn`.


{{alias}}.kernel8d( fcn, arr, views, sx, strategy, opts )
Performs a reduction over an input ndarray and assigns results to a provided
output ndarray.

Parameters
----------
fcn: Function
Wrapper for a one-dimensional strided array reduction function.

arr: Array<Object>
Array containing one input ndarray descriptor and one output ndarray
descriptor, followed by any additional ndarray arguments.

views: Array<Object>
Initialized ndarray descriptors representing subarray views.

sx: Array<integer>
Loop dimension strides for the input ndarray. Should have eight
elements.

strategy: Function
Input ndarray reshape strategy.

opts: Object
Function options which are passed through to `fcn`.


{{alias}}.kernel9d( fcn, arr, views, sx, strategy, opts )
Performs a reduction over an input ndarray and assigns results to a provided
output ndarray.

Parameters
----------
fcn: Function
Wrapper for a one-dimensional strided array reduction function.

arr: Array<Object>
Array containing one input ndarray descriptor and one output ndarray
descriptor, followed by any additional ndarray arguments.

views: Array<Object>
Initialized ndarray descriptors representing subarray views.

sx: Array<integer>
Loop dimension strides for the input ndarray. Should have nine elements.

strategy: Function
Input ndarray reshape strategy.

opts: Object
Function options which are passed through to `fcn`.


{{alias}}.kernel10d( fcn, arr, views, sx, strategy, opts )
Performs a reduction over an input ndarray and assigns results to a provided
output ndarray.

Parameters
----------
fcn: Function
Wrapper for a one-dimensional strided array reduction function.

arr: Array<Object>
Array containing one input ndarray descriptor and one output ndarray
descriptor, followed by any additional ndarray arguments.

views: Array<Object>
Initialized ndarray descriptors representing subarray views.

sx: Array<integer>
Loop dimension strides for the input ndarray. Should have ten elements.

strategy: Function
Input ndarray reshape strategy.

opts: Object
Function options which are passed through to `fcn`.

See Also
--------

Loading
Loading