Your task is to write a short C program that measures the time to perform the product of two N \times N-size matrices
A and B, C = AB. The entries of result matrix C are calculated as
\begin{equation*}
C_{ij} = \sum_{k=1}^{m} a_{ik}b_{kj}
\end{equation*}
1. Write a straight forward implementation of this matrix product. Measure and document the time it takes in
your pdf. Identify what the problematic access pattern is in this implementation.
2. Write a new implementation where you solve this problem by using a temporary matrix (hint: transpose one
matrix). Measure and document the time it takes in your pdf. Include the creation of the temporary matrix
in your time measurement.
3. For large matrices it might not be possible to have a temporary matrix copy due to memory size. Anyway,
we can do even better. Based on the original approach, use blocking, that is process k \times k blocks at a time.
(Hint: k should relate to the cache line size). Write an implementation based on blocking. Measure and
document the time it takes in your pdf. Explain your approach briefly. (Hint: it might not be easy to get a
good improvement, an in-principle-correct attempt will be considered good enough.)
Use N = 1000 and arrays of double for the data type.