Professional Documents
Culture Documents
parallelism
Muhammad Taha & Muhammad Usman
Agenda
• Introduction
• Space partition
• Space partition constraints
• Solving Space partition constraints
• Simple code generation
• Eliminating Empty Iterations
• Eliminating tests from innermost loops
02/10/2023 7
• Only one loop can be paralyzed not the
inner , so this way we say it has 1
degree of parallelism.
• If we have n parallelizable loops means,
we have n degree of parallelism
• The function from iteration space to processor space must be affine function.
• Pid = Ci +c
Ci + c
• .f(i) = Ci + c if Ri + r >= 0
02/10/2023 14
Space partition constraints
for(i=0;i<=100;i++)
{
for(j=0;j<=100;j++)
{
X[i,j] = X[i,j] + Y[i-1,j]
Y[i,j] = Y[i,j] + X[i,j-1]
}
}
Y[i,j] <=>Y[i,j]
Y[i,j]<=>Y[i-1,j]
02/10/2023 PRESENTATION TITLE 16
I,j -- I’ , j’
I = I’
J = j’-1
P1 = i-j-1
P2 = i-j
When s1 =1, s2 = 0
When s1 =1 , s2 =1