for all P_m do in parallel for i = m to n by p do for j = i to n do C[i,j] = 0 for k = 1 to n do C[i,j] = C[i,j] + A[i,k]*B[k,j] end end end end