F-style transformation of non-contiguous to contiguous layout
![]() |
![]() |
Examples illustrating transformation to contiguous layout in F-style
Eg.1: Location of element in x with index (1, 2, 1)
For a F-style non-contiguous layout with shape, (d0 = 2, d1 = 4, d2 = 3) the value in (n0 = 1, n1 = 2, n2 = 1) of the non-contiguous layout is located in the contiguous layout with index nF given by,
![]() |

Eg.2: Location of element in x with index (1, 1, 1)
For a F-style non-contiguous layout with shape, (d0 = 2, d1 = 4, d2 = 3) the value in (n0 = 1, n1 = 1, n2 = 1) of the non-contiguous layout is located in the contiguous layout with index nFgiven by,
![]() |
To move from the element with index (1, 2, 1) in the array x to the element at (1, 1, 1), two elements within the array must be jumped.
❷