-
Notifications
You must be signed in to change notification settings - Fork 8
August log
We now have a reasonably confident way to determine the single dimension array access of a logical multi-dimensional counterpart, and a method to find the set of banks we can access dynamically.
Let's see if we can observe changes to bank access by unrolling in a different dimension.
a: float[3][3] bank(3)
for (let i = 0..3) unroll 3 {
for (let j = 0..3) {
access(a[i][j])
}
}
would require banking in terms of the 1st dimension and
a: float[3][3] bank(3)
for (let i = 0..3) {
for (let j = 0..3) unroll 3 {
access(a[i][j])
}
}
would require banking in 2nd dimension.
For the 1st instance, we can rewrite the array access as,
$$
a[\langle s_i,d_i \rangle][\langle s_j,d_j \rangle] | s_i \in 0..3, d_i \in 0..1, s_j \in 0..1, d_j \in 0..3
$$
for a set of dynamic components
we'd access elements
For the 2nd instance, we can rewrite the array access as,
$$
a[\langle s_i,d_i \rangle][\langle s_j,d_j \rangle] | s_i \in 0..1, d_i \in 0..3, s_j \in 0..3, d_j \in 0..1
$$
for a set of dynamic components
we'd access elements
This is exactly what we want by index types. However, we need a neat way to bank the single dimensional arrays to reflect the anticipated memory layout by index types.
An earlier suggestion for this was respectively,
a: float[3 bank(3)][3 bank(1)]
and
a: float[3 bank(1)][3 bank(3)]