Question: Matrix - vector multiplication, denoted as y = A x , is a very common operation in linear algebra and has a variety of real

Matrix-vector multiplication, denoted as y=Ax, is a very common operation in linear algebra and has a
variety of real-world applications (e.g. graph theory, deep learning, quantum mechanics, etc.). Each yi entry
is computed as Ai0x0+Ai1x1+dots+Aijxj.
Suppose you are a researcher with access to high-performance computing (HPC) systems at ARCH (Advanced
Research Computing at Hopkins). You are tasked to implement an optimized the matrix-vector routine in C.
An example declaration of your function follows below:// y is an m-length vector (array)
// A is an m by n matrix (2d array)
// x is an n-length vector (array)
void matrix_vector_multiply(double* y, double* A, double* x, int m, int n);An efficient routine will make good use of pipelineing and caches. Assume for this task that all matrix-vector
multiplication routines considered have equivalent algorithmic efficiency.
(a) Assume A is too big to fit into cache at once, but x and y could potentially fit into cache simultaneously
with some room left over (i.e.m+n is much less than mn). What is the best order to iterate over the
entries of A??1 Why? Give your answer in two to four sentences long.
(b) Does matrix-vector multiplication present any pipelining concerns (e.g. data hazards, control hazards)?
Why or why not? Give your answer in two to four sentences long.
 Matrix-vector multiplication, denoted as y=Ax, is a very common operation in

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 Databases Questions!