Fastest-varying first: a rows, cols matrix is [cols, rows].
rows, cols
[cols, rows]
final List<int> dims;