Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Dense matri x -vector multiplication . Consider th e multiplication of a dense n x n matrix A with a vector b to yield anther

Dense matrix-vector multiplication .

Consider the multiplication of a dense n x n matrix A with a vector b to yield anther vector y. The ith element y [l] of the product vector is the dot-product of the i th row of A with the input vector b; i.e., Figure 1, the computation of each y[i] can be regarded as a task. As shown in Figure 2, the computation could be decomposed into fewer, say four, tasks where each task computes roughly n/4 of the entries of the vector y.

A b y

0 1 n

Task 1

Task 2

Task n

Figure 1

A b y

0 1 n

Task 1

Task 2

Task n

Figure 2

1)Write a sequential program with C for figure 1.

2) Write a parallel program with OpenMP for figure 2

3) Write a parallel program with OpenAcc for figure 2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases And Python Programming MySQL MongoDB OOP And Tkinter

Authors: R. PANNEERSELVAM

1st Edition

9357011331, 978-9357011334

More Books

Students also viewed these Databases questions