11.07.2015 Views

A Compiler for Parallel Exeuction of Numerical Python Programs on ...

A Compiler for Parallel Exeuction of Numerical Python Programs on ...

A Compiler for Parallel Exeuction of Numerical Python Programs on ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

case, assume we had a C array starting at some arbitrary positive integer b 0 ≤ b 1 . 1RCSLMADs can be rewritten as:TheL 1 = b 0 + m ∗ (i + t 1 ) + r 1 (5.36)t 1 = ⌊(b 1 − b 0 )/m⌋ (5.37)r 1 = (b 1 − b 0 )%m (5.38)L 2 = b 0 + m ∗ (i + t 2 ) + r 2 (5.39)t 2 = ⌊(b 2 − b 0 )/m⌋ (5.40)r 2 = (b 2 − b 0 )%m (5.41)0 ≤ i < u (5.42)Further rewriting:L 1 = b 0 + m ∗ j + r 1 (5.43)t 1 ≤ j < u + t 1 (5.44)L 2 = b 0 + m ∗ k + r 2 (5.45)t 2 ≤ k < u + t 2 (5.46)We observe that the value t 1 will be less than or equal to t 2 because b 1 ≤ b 2 . We canc<strong>on</strong>struct an RCSLMAD L 3 that is a superset <str<strong>on</strong>g>of</str<strong>on</strong>g> L 1 by increasing the domain <str<strong>on</strong>g>of</str<strong>on</strong>g> L 1 .L 3 = (b 0 + r 1 ) + m ∗ j (5.47)0 ≤ j < u + t 2 (5.48)Similarly we can c<strong>on</strong>struct an RCSLMAD L 4 as a superset <str<strong>on</strong>g>of</str<strong>on</strong>g> L 2 .L 4 = (b 0 + r 2 ) + m ∗ j (5.49)0 ≤ j < u + t 2 (5.50)L 3 and L 4 are defined over the same domain D ′ = {j|0 ≤ j < u + t 2 }. Further, thedifference in bases <str<strong>on</strong>g>of</str<strong>on</strong>g> L 3 and L 4 is equal to |r 1 − r 2 | and |r 1 − r 2 | < m because r 1 < m andr 2 < m. The uni<strong>on</strong> <str<strong>on</strong>g>of</str<strong>on</strong>g> L 3 and L 4 is there<str<strong>on</strong>g>for</str<strong>on</strong>g>e a <strong>on</strong>e-dimensi<strong>on</strong>al ERL E defined over domainD ′ with stride m and with bases b 0 + r 1 and b 0 + r 2 . Since we have not yet chosen b 0 , weshould attempt to choose a b 0 such that the set D ′ is the smallest. The integer b 0 = b 1 gives1 The new base b 0 will later be chosen to minimize the domain <str<strong>on</strong>g>of</str<strong>on</strong>g> an RCSLMAD that combines thememory references <str<strong>on</strong>g>of</str<strong>on</strong>g> L 1 and L 2 .43

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

Saved successfully!

Ooh no, something went wrong!