Exercise 3: Matrix multiplication by block partitioning.
Let c and r be integers, less than or equal to an integer n.
Suppose we want to form C = A * B where A is an nxn matrix and
B is an nxn matrix. Consider performing the multiplication by
partitioning A into rxc blocks and partitioning B into cxr
blocks and doing block multiplication. For example, we would
form the top left rxr block of C by taking
Write a function (C or Matlab, whichever is more comfortable)
to perform matrix multiplication this way. Remember to include
a "clean up" loop in case n/c or n/r is not an integer.
Suppose n is fixed.
How does the architecture of the computer affect how fast
your function runs for different values of r and c?