I am researching loop fusion at my university, but i just started and am confused about the notation for his summations.
Code:
10
w[k] = sum (a[i,j] * b[j,k,l] * c[k,l]
i,j,l
the i,j,l are what is underneath the sum and their upper bounds are each 10
shouldn't it be
Code:
for(i=0;i<10;i++){
for(j=0;j<10;j++){
for(l=0;l<10;l++){
w[k] = w[k] + a[i,j] * b[j,k,l] * c[k,l]
}
}
}
but he does these steps
Code:
tmp[j] = sum(a[i,j])
i
tmp2[j,k,l] = b[j,k,l] * c[k,l]
tmp3[j,k] = sum(tmp2[j,k,l])
l
tmp4[j,k] = tmp[j]*tmp3[j,k]
w[k] = sum(tmp4[j,k])
j
i'm confused!