forked from stdlib-js/stdlib
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrepl.txt
More file actions
67 lines (48 loc) · 2.01 KB
/
repl.txt
File metadata and controls
67 lines (48 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{{alias}}( shape, stridesW, stridesX, stridesY, stridesZ )
Reorders ndarray dimensions and associated strides for loop interchange.
The function returns an object having the following properties:
- sh: ordered dimensions.
- sw: first input array strides sorted in loop order.
- sx: second input array strides sorted in loop order.
- sy: third input array strides sorted in loop order.
- sz: output array strides sorted in loop order.
For all returned arrays, the first element corresponds to the innermost
loop, and the last element corresponds to the outermost loop.
The function assumes that the input and output ndarrays have the same shape.
Hence, loop interchange order should only be determined after broadcasting.
Parameters
----------
shape: ArrayLikeObject<integer>
Array dimensions.
stridesW: ArrayLikeObject<integer>
First input array strides.
stridesX: ArrayLikeObject<integer>
Second input array strides.
stridesY: ArrayLikeObject<integer>
Third input array strides.
stridesZ: ArrayLikeObject<integer>
Output array strides.
Returns
-------
out: Object
Loop interchange data.
out.sh: Array<integer>
Ordered dimensions.
out.sw: Array<integer>
First input array strides sorted in loop order.
out.sx: Array<integer>
Second input array strides sorted in loop order.
out.sy: Array<integer>
Third input array strides sorted in loop order.
out.sz: Array<integer>
Output array strides sorted in loop order.
Examples
--------
> var w = {{alias:@stdlib/ndarray/array}}( [ [ 1, 2 ], [ 3, 4 ] ] );
> var x = {{alias:@stdlib/ndarray/array}}( [ [ 5, 6 ], [ 7, 8 ] ] );
> var y = {{alias:@stdlib/ndarray/array}}( [ [ 9, 10 ], [ 11, 12 ] ] );
> var z = {{alias:@stdlib/ndarray/array}}( [ [ 0, 0 ], [ 0, 0 ] ] );
> var o = {{alias}}( w.shape, w.strides, x.strides, y.strides, z.strides )
{...}
See Also
--------