Matrix Multiplication in C language: This project is designed to show the perfor
ID: 3721587 • Letter: M
Question
Matrix Multiplication in C language:
This project is designed to show the performance improvement and overhead of multi-threading with OpenMP APIs for the matrix multiplication application. There are multiple ways to calculate matrix multiplication [1]. Only straightforward calculation algorithms are required for memory reference locality purposes. More advanced algorithm such as Strassen’s algorithm is not required.
You need to:
1) use at least two direct methods (refer to [2] for more details) to implement matrix multiplication (mmul) in C language;
2) calculate the execution time of matrix multiplication for certain number of for-loops;
3) use OpenMP with multi-threading to speed up each method of matrix multiplication;
4) change the number of threads, matrix size and number of for-loops, to show the overhead of multi-threading;
[1] https://en.wikipedia.org/wiki/Matrix_multiplication_algorithm
[2] https://en.wikipedia.org/wiki/Locality_of_reference#Matrix_multiplication