Question: If you add two matrices, A which is 1 2 x 6 and B which is 1 2 x 6 , why does it matter
If you add two matrices, A which is x and B which is x why does it matter if the outer loop is on the rows or the columns?
It is better to have the outer loop longer to reduce the loop setup time.
It is better to have the outer loop shorter to reduce repeated loop setup time for the inner loop.
The matrix is stored in row major order, so it's better to loop on rows.
The scan will have to look at more than positions.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
