Re: 2-dimensional DW array access without MULs?



robertwessel2@xxxxxxxxx wrote:
Jim Leonard wrote:
If the accesses are not purely random, there are often opportunities to
reduce the index calculations to simple adds to get to the next
element. A classic example is a dot-product loop where you'd be doing
something like:

for (i=0; i<n; i++)
s+=a[r][i]*b[i][c]; //where r and c are invariant for the loop

The stepping through those two arrays should reduce to a simple add
each (one the size of an element, the other the size of a row).

This gives me a lot to think about, thanks.

.