{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

cs240a-cilkapps - CS 240A Examples with Cilk Divide Conquer...

Info iconThis preview shows pages 1–14. Sign up to view the full content.

View Full Document Right Arrow Icon
1 CS 240A : Examples with Cilk++ Thanks to Charles E. Leiserson for some of these slides Divide & Conquer Paradigm for Cilk++ Solving recurrences Sorting: Quicksort and Mergesort Graph traversal: Breadth-First Search
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2 T P = execution time on P processors T 1 = work T = span * * Also called critical-path length or computational depth . Speedup on p processors T 1 /T p Parallelism T 1 /T Work and Span (Recap)
Background image of page 2
3 Sorting Sorting is possibly the most frequently executed operation in computing! Quicksort is the fastest sorting algorithm in practice with an average running time of O(N log N), (but O(N 2 ) worst case performance) Mergesort has worst case performance of O(N log N) for sorting N elements Both based on the recursive divide-and- conquer paradigm
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon