01.12.2012 Views

slides - Friedrich-Schiller-Universität Jena

slides - Friedrich-Schiller-Universität Jena

slides - Friedrich-Schiller-Universität Jena

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.

abstract parallelization<br />

array x0(0,n), x1(0,n);<br />

for int m = 1 to c {<br />

loop tiling<br />

for_parallel int i0 = 0 to n step n0 {<br />

array y0(i0-1,i0+n0), y1(i0,i0+n0-1);<br />

y0 = x0;<br />

for_parallel int i = i0 to i0+n0-1 {<br />

y1(i) = if (i==0) 0.0<br />

else if (i==n) 0.0<br />

else 1.0 – y0(i) + 0.5 * ( y0(i-1)+y0(i+1) );<br />

}<br />

x1 = y1;<br />

}<br />

swap(x1, x0);<br />

}<br />

local array y0, y1<br />

data transfer at<br />

y0=x0, x1=y1

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

Saved successfully!

Ooh no, something went wrong!