Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Let us consider a vector addition application. Two vectors of length n can be added in parallel using at most n processors, as shown in

image text in transcribed

Let us consider a vector addition application. Two vectors of length n can be added in parallel using at most n processors, as shown in the figure. Here, pi denotes ith processor. If we have n processors, then asymptotic run time of a vector addition program can be reduced from (n) to O (1) upon parallelizing. In general, if you have p processors and execution time is ts seconds for a sequential version of an application, then you should see a speed-up (theoretically) of O(ts/p) upon parallelizing the application. Figure 1: Vector addition: Sequential to Parallel example * Please note that all sequential algorithms can't be converted to parallel algorithms and you have to be cautious while taking these design decisions. Task You are asked to write a program for the above application and parallelize it. You can use any programming language (C/C++, Java, Python, etc. ) with which you are familiar. You are allowed to use external libraries such as OpenMP, OpenCL, CUDA, etc. You are required to submit a report containing the code (both sequential version and parallel version)

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

Step: 3

blur-text-image

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

Mastering Real Time Analytics In Big Data A Comprehensive Guide For Everyone

Authors: Lennox Mark

1st Edition

B0CPTC9LY9, 979-8869045706

More Books

Students also viewed these Databases questions