21.01.2013 Views

Lecture Notes in Computer Science 4917

Lecture Notes in Computer Science 4917

Lecture Notes in Computer Science 4917

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.

Experiences with Paralleliz<strong>in</strong>g a Bio-<strong>in</strong>formatics Program on the Cell BE 167<br />

through arrays <strong>in</strong>dexed by j. Thus, the execution of the <strong>in</strong>ner loop body has<br />

data dependencies with two prior executions of the loop body.<br />

To vectorize the forward and backward loops, we need to identify V data<strong>in</strong>dependent<br />

loop iterations, where V is the vectorization factor. In these loops,<br />

the vectorization factor is 4, s<strong>in</strong>ce scalar variables are 32-bit <strong>in</strong>tegers and the<br />

vector length is 128 bits. Data-<strong>in</strong>dependent loop iterations occur for skewed iteration<br />

counts for the i-loop and the j-loop. In particular, loop iterations (i0,j0)<br />

and (i1,j1) are <strong>in</strong>dependent when i0 + j0 = i1 + j1. Consequently, vectorization<br />

requires the construction of loop pre-ambles and post-ambles to deal with<br />

non-vectorizable portions of the loop body.<br />

The PW forward loop computes the position of the maximum score. The<br />

orig<strong>in</strong>al code records the “first” loop iteration where the maximum value occurs<br />

(if(b > a){a=b; imax=i; jmax=j;}). Here, the “first” loop iteration is the<br />

one that occurs first <strong>in</strong> the lexicographic order<strong>in</strong>g<br />

(i, j) < (i ′<br />

,j ′<br />

) if (i

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

Saved successfully!

Ooh no, something went wrong!