Parallel Programming - Informatik

shapecartΛογισμικό & κατασκευή λογ/κού

1 Δεκ 2013 (πριν από 4 χρόνια και 7 μήνες)

112 εμφανίσεις

Fakult¨at Informatik
Christoph von Praun
November 12,2010
Parallel Programming
Exercise 5:Recursive Splitting
Programming Exercise 5.1
Implement a parallel Merge Sort.Stop recursive splitting if the length of the (sub-)array to be
sorted falls below a certain threshold.Use an efficient in-place sequential sort algorithm,e.g.
Hints for performance:
 Don’t allocate a fresh array as destination for the sorted results of a task.Allocate two
arrays that each have the capacity to hold the entire input.Flip their roles as input and
output arrays at each level in the task hierarchy.
 Experiment with different task schedules to improve data locality.
Programming Exercise 5.2
Design a recursive algorithm that solves the Traveling Salesman Problem using exhaustive
a) Implement this algorithmas sequential program.
b) Is your implementation amenable to parallelization according to recursive splitting?