<div><p>
<b>Example: Matrix multiplication</b></p>
<pre>
Real*8 a(n,n), b(n,n), c(n,n)
do ii=1,n,nb  ! &lt; nb is blocking factor
  do jj=1,n,nb
    do kk=1,n,nb
      do i=ii,min(n,ii+nb-1)
        do j=jj,min(n,jj+nb-1)
          do k=kk,min(n,kk+nb-1)
            c(i,j)=c(i,j)+a(j,k)*b(k,i)
          end do
        end do
      end do
    end do
  end do
end do
</pre></div>