Question: Matrix Multiplication using thread Write a program that do the following: 1- Create two matrices A of length N*M and B of length M and
Matrix Multiplication using thread
Write a program that do the following:
1- Create two matrices A of length N*M and B of length M and L, use any numbers to check validity
Crecreate matrix c of length N*L
2- Initialize these matrices randomly using method of range 1-20
4- Create N thread using executor service
ExecutorService executor = Executors.newFixedThreadPool(N);
Each thread will work on a row from Matrix A and will take the B , and c as input
5- Write the definition of The thread class named MultiplyThread which will Multiply row of A with Col of B to generate Row of C
6- In the Run method write a Multiply method
7- Print the 3 matrices A, b, and c in the main after All threads finished work
*************************Java language********************
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
