Question: Simple Matrix Multiplcation using pthreads: Write a program in C99 using pthreads to compute matrix multiplication on square matrices using the simple parallel algorithm as
Simple Matrix Multiplcation using pthreads: Write a program in C99 using pthreads to compute matrix multiplication on square matrices using the simple parallel algorithm as discussed in class where each thread gets a separate row and column. IE: thread #1 gets row 0 and column 0 while thread #2 gets row 1 and column 1 does the required computation, then thread #0 gets column 1 and thread #2 gets column 0 in an iterative fashion. This is not 'swapping' indices, but starting with an offset and wrapping around to the beginning in a circular fashion. This is the algorithm we discussed in class where no two threads will read the same column/row at the same time. I will go over this again in class briefly. NOTE: This is specifically NOT the block matrix algorithm from the book and is simply a parallelized version of the normal sequential algorithm with some consideration given to avoid read conflicts
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
