Matrix Multiplication: Write a matrix multiplication program. Matrices dimensions and values are taken as an input from user. Multiply the two matrices together then print the result to the console.
Note: Must use dynamic allocation.
Example:
Welcome to Matrix multiplication program!
Please enter dimensions of the first matrix: 3 2
Please enter its elements:
1 2
5 8
1 5
Please enter dimensions of the second matrix: 2 2
Please enter its elements:
6 8
10 30
Result Matrix is ( 3 x 2):
26 68 110
180 56 158
You will develop a parallel program of The matrix Multiplication using the Master-Slave Paradigm.
- Use send and receive to distribute the work on slaves.
Example for a parallel scenario (use the scenario you find suitable):
- Divide rows of 1st matrix across slaves and send to them the complete 2nd
- Divide rows of 1st matrix and columns of 2nd matrix across slaves.
- Handle the remainder workload with any scenario you find suitable.
- Matrix input is taken from the user.
Check if the two matrices can be multiplied first.
Reviews
There are no reviews yet.