You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rjleveque edited this page Apr 17, 2011
·
3 revisions
Rewriting arrays for interleaved storage
Currently in two space dimensions, for example, the main solution array in classic Clawpack is dimensioned as q(1:meqn, 1-mbc:mx+mbc, 1-mbc:my+mbc), with the index for the component of the system first, followed by (i,j) for the location in the grid. Because of the way Fortran stores arrays, this means that the memory stride between q(1,i,j) and q(2,i,j) for example is (mx+2*mbc) * (my+2*mbc), leading to inefficient cache performance.
The plan is to revamp all of Clawpack so that this array will be dimensioned as q(1-mbc:mx+mbc, 1-mbc:my+mbc, 1:meqn), with analogous changes to the aux arrays.