Question: I have been able to find a solution for the serial code matrix multiplication. SOLUTION: program displayMatrix VAR matrix ARRAY ( 6 4 ) integer

I have been able to find a solution for the serial code matrix multiplication.
SOLUTION:
program displayMatrix
VAR matrix ARRAY(64) integer
rowCounter =1
for i =1 to 64
matrix[i]= i
write(matrix[i])
if rowCounter =8 then
writeln("")
rowCounter =0
end if
rowCounter = rowCounter +1
next
writeln("Matrix multiplication result:")
rowIndex =1
for row =1 to 8
for col =1 to 8
total =0
currentRow = rowIndex
colIndex = col
for k =1 to 8
product = currentRow * colIndex
total = total + product
currentRow = currentRow +1
colIndex = colIndex +8
next
write(total)
total =0
next
rowIndex = rowIndex +8
writeln("")
next
end
I need help with this. Using the CPU YASMIN simulator
1. Write a parallel code which will run on 4 CPUs.
2. Write a parallel code which will run on 16 CPUs

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!