a) Write the sequential version in C++ (refer the sequential algorithm below). Show the proof of correctness of your program (you can run your program with a small matrix size (e.g. 4x4 and small...


Hi there, I needed help solving this problem. Can you help me with this?


a) Write the sequential version in C++ (refer the sequential algorithm below). Show the<br>proof of correctness of your program (you can run your program with a small matrix size (e.g.<br>4x4 and small vector size (e.g. 4x1), verify it correctness, and attach a screenshot of correct<br>result to this document). You can generate your matrix A and vector b using random numbers<br>in the range of 1 to 10. Also, feel free to re-use any parts of the given codes to develop your<br>own programs.<br>Sequential Algorithm for matrix-vector multiplication<br>a[0..m – 1,0..n – 1]– matrix with dimension m x n<br>b[0..n – 1) – vector with dimension × 1<br>Input:<br>Output: c0..m –- 1) – result vector with dimension m x 1<br>for i + 0 to m – 1<br>c[i] ++ 0<br>for j + 0 to n – 1<br>c[i) + c[t) + a[i, j) × b\j]<br>endfor<br>endfor<br>b) Write MPI version in C++. Show proof of correctness.<br>

Extracted text: a) Write the sequential version in C++ (refer the sequential algorithm below). Show the proof of correctness of your program (you can run your program with a small matrix size (e.g. 4x4 and small vector size (e.g. 4x1), verify it correctness, and attach a screenshot of correct result to this document). You can generate your matrix A and vector b using random numbers in the range of 1 to 10. Also, feel free to re-use any parts of the given codes to develop your own programs. Sequential Algorithm for matrix-vector multiplication a[0..m – 1,0..n – 1]– matrix with dimension m x n b[0..n – 1) – vector with dimension × 1 Input: Output: c0..m –- 1) – result vector with dimension m x 1 for i + 0 to m – 1 c[i] ++ 0 for j + 0 to n – 1 c[i) + c[t) + a[i, j) × b\j] endfor endfor b) Write MPI version in C++. Show proof of correctness.

Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here