Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Parallel computing COMP 4073: Homework #2 Due: 11/12/2018, Monday Merge sort is one of divide-and-conquer algorithm to sort a list of items efficiently. The following

image text in transcribed
Parallel computing COMP 4073: Homework #2 Due: 11/12/2018, Monday Merge sort is one of divide-and-conquer algorithm to sort a list of items efficiently. The following is the Pseudo code of merge sort. In this homework, you need to 1) write a merge sort C++ serial program using recursion; and then 2) write an OpenMP C++ program to parallelize your merge sort program using OpenMP tasks. 3) test your serial and OpenMP merge sort program using a list of random numbers with size of 10,000,000, report the speedup of your OpenMP program vs. your serial program. Algorithm 1: MergeSort(A) Input Array A of length n Output: Sorted A 1 if n is 1 then 2return A 3 end 4 else 7 return Merge(L, R) 8 end Your grade will be not only determined by the correctness of the total number, but also depends on your program performance. Report the speedup of your program using 1, 2, 4, and 8 threads respectively

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

Database Processing Fundamentals, Design, and Implementation

Authors: David M. Kroenke, David J. Auer

14th edition

133876705, 9781292107639, 1292107634, 978-0133876703

More Books

Students also viewed these Databases questions

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago