time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

repl.txt (3528B)


      1 
      2 {{alias}}( arrays, shape, strides, fcn )
      3     Applies a quinary callback to strided input array elements and assigns
      4     results to elements in a strided output array.
      5 
      6     The `shape` and `strides` parameters determine which elements in the strided
      7     input and output arrays are accessed at runtime.
      8 
      9     Indexing is relative to the first index. To introduce an offset, use typed
     10     array views.
     11 
     12     Parameters
     13     ----------
     14     arrays: ArrayLikeObject<ArrayLikeObject>
     15         Array-like object containing five strided input arrays and one strided
     16         output array.
     17 
     18     shape: ArrayLikeObject<integer>
     19         Array-like object containing a single element, the number of indexed
     20         elements.
     21 
     22     strides: ArrayLikeObject<integer>
     23         Array-like object containing the stride lengths for the strided input
     24         and output arrays.
     25 
     26     fcn: Function
     27         Quinary callback.
     28 
     29     Examples
     30     --------
     31     > var x = new {{alias:@stdlib/array/float64}}( [ 1.0, 2.0, 3.0, 4.0 ] );
     32     > var y = new {{alias:@stdlib/array/float64}}( [ 1.0, 2.0, 3.0, 4.0 ] );
     33     > var z = new {{alias:@stdlib/array/float64}}( [ 1.0, 2.0, 3.0, 4.0 ] );
     34     > var w = new {{alias:@stdlib/array/float64}}( [ 1.0, 2.0, 3.0, 4.0 ] );
     35     > var u = new {{alias:@stdlib/array/float64}}( [ 1.0, 2.0, 3.0, 4.0 ] );
     36     > var v = new {{alias:@stdlib/array/float64}}( [ 0.0, 0.0, 0.0, 0.0 ] );
     37     > var shape = [ x.length ];
     38     > var strides = [ 1, 1, 1, 1, 1, 1 ];
     39     > function f( x, y, z, w, u ) { return x + y + z + w + u; };
     40     > {{alias}}( [ x, y, z, w, u, v ], shape, strides, f );
     41     > v
     42     <Float64Array>[ 5.0, 10.0, 15.0, 20.0 ]
     43 
     44 
     45 {{alias}}.ndarray( arrays, shape, strides, offsets, fcn )
     46     Applies a quinary callback to strided input array elements and assigns
     47     results to elements in a strided output array using alternative indexing
     48     semantics.
     49 
     50     While typed array views mandate a view offset based on the underlying
     51     buffer, the `offsets` parameter supports indexing semantics based on
     52     starting indices.
     53 
     54     Parameters
     55     ----------
     56     arrays: ArrayLikeObject<ArrayLikeObject>
     57         Array-like object containing five strided input arrays and one strided
     58         output array.
     59 
     60     shape: ArrayLikeObject<integer>
     61         Array-like object containing a single element, the number of indexed
     62         elements.
     63 
     64     strides: ArrayLikeObject<integer>
     65         Array-like object containing the stride lengths for the strided input
     66         and output arrays.
     67 
     68     offsets: ArrayLikeObject<integer>
     69         Array-like object containing the starting indices (i.e., index offsets)
     70         for the strided input and output arrays.
     71 
     72     fcn: Function
     73         Quinary callback.
     74 
     75     Examples
     76     --------
     77     > var x = new {{alias:@stdlib/array/float64}}( [ 1.0, 2.0, 3.0, 4.0 ] );
     78     > var y = new {{alias:@stdlib/array/float64}}( [ 1.0, 2.0, 3.0, 4.0 ] );
     79     > var z = new {{alias:@stdlib/array/float64}}( [ 1.0, 2.0, 3.0, 4.0 ] );
     80     > var w = new {{alias:@stdlib/array/float64}}( [ 1.0, 2.0, 3.0, 4.0 ] );
     81     > var u = new {{alias:@stdlib/array/float64}}( [ 1.0, 2.0, 3.0, 4.0 ] );
     82     > var v = new {{alias:@stdlib/array/float64}}( [ 0.0, 0.0, 0.0, 0.0 ] );
     83     > var shape = [ x.length ];
     84     > var strides = [ 1, 1, 1, 1, 1, 1 ];
     85     > var offsets = [ 0, 0, 0, 0, 0, 0 ];
     86     > function f( x, y, z, w, u ) { return x + y + z + w + u; };
     87     > {{alias}}.ndarray( [ x, y, z, w, u, v ], shape, strides, offsets, f );
     88     > v
     89     <Float64Array>[ 5.0, 10.0, 15.0, 20.0 ]
     90 
     91     See Also
     92     --------
     93