29.01.2015 Views

Embedded Software for SoC - Grupo de Mecatrônica EESC/USP

Embedded Software for SoC - Grupo de Mecatrônica EESC/USP

Embedded Software for SoC - Grupo de Mecatrônica EESC/USP

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Generalized Data Trans<strong>for</strong>mations 425<br />

that the reference exhibits spatial reuse in the j loop. Since this loop (j loop)<br />

is the innermost loop, we can expect that this reuse will be converted into<br />

locality during execution. However, this would not be the case if i was the<br />

inner loop and j was the outer loop.<br />

Consi<strong>de</strong>r the application of a non-singular linear loop trans<strong>for</strong>mation to<br />

an n-<strong>de</strong>ep loop nest that accesses an array with the subscript function<br />

represented as This trans<strong>for</strong>mation can be represented by an n × n<br />

non-singular trans<strong>for</strong>mation matrix T, and maps the iteration of the original<br />

loop nest to the iteration of the trans<strong>for</strong>med loop nest [7]. On applying<br />

such a trans<strong>for</strong>mation, the new subscript function is obtained as<br />

that is, the new (trans<strong>for</strong>med) reference matrix is The loop trans<strong>for</strong>mation<br />

also affects the loop bounds of the iteration space that can be computed<br />

using techniques such as Fourier-Motzkin elimination [7]. For convenience,<br />

we <strong>de</strong>note by Q. For example, a loop trans<strong>for</strong>mation such as:<br />

trans<strong>for</strong>ms an original loop iteration<br />

to<br />

3. GENERALIZED DATA TRANSFORMATIONS<br />

Given an array reference to an m-dimensional array A in an n-level<br />

nested loop, a data trans<strong>for</strong>mation trans<strong>for</strong>ms this reference to<br />

Here, corresponds to the trans<strong>for</strong>med array, and and <strong>de</strong>note the<br />

trans<strong>for</strong>med reference matrix and constant vector, respectively. In general,<br />

can have dimensions, where<br />

Formally, we can <strong>de</strong>fine a data trans<strong>for</strong>mation <strong>for</strong> an array A using a pair<br />

This pair (referred to as data trans<strong>for</strong>mation hence<strong>for</strong>th) per<strong>for</strong>ms<br />

the following two mappings:<br />

In other words, the original reference matrix X is trans<strong>for</strong>med to and<br />

the original constant vector is trans<strong>for</strong>med to We refer to as<br />

the data trans<strong>for</strong>mation matrix and as the displacement vector. If<br />

is the original reference and<br />

is the trans<strong>for</strong>med reference,<br />

we have and Note that is and<br />

has entries. An example data trans<strong>for</strong>mation is <strong>de</strong>picted in Figure 31-4(a).<br />

In this data trans<strong>for</strong>mation, a 4 × 4 array (<strong>for</strong> illustrative purposes) is transposed;<br />

that is, the array element in the original array is mapped to array<br />

element in the trans<strong>for</strong>med space. Note that in this case we have:<br />

and

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!