• Keine Ergebnisse gefunden

Assignment on Massively Parallel Algorithms - Sheet 10

N/A
N/A
Protected

Academic year: 2021

Aktie "Assignment on Massively Parallel Algorithms - Sheet 10"

Copied!
1
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Prof. G. Zachmann A. Srinivas

University of Bremen School of Computer Science

CGVR Group July 9, 2014

Summer Semester 2014

Assignment on Massively Parallel Algorithms - Sheet 10

Due Date 16. 07. 2014

Exercise 1 (Sorting Networks, 4 Credits )

In its simplest form, bubble sort is a data independent sorting algorithm, too, like odd-even and bitonic sorting.

a) Show the sorting network that implements bubble sort for an input of 5 elements.

b) Sketch the parallel version of bubble sort using pseudo-code.

c) Implement your algorithm in cuda

d) Write a unit test for your implementation. For the CPU version, you can use std::sort from the standard template library.

Exercise 2 (Bitonic Sorter, 4 Credits )

a) In class, you have learned that a bitonic sorter has depth complexityDS(n)∈O log2n

. Derive the exact number of the depth complexityDM(n) of a bitonic merger (assuming that we have an unlimited number of comparators/threads at our disposal).

b) Do the same for the depth complexityDS(n) of a bitonic sorter.

c) You have also learned that the work complexity of the bitonic merger isC(n) = 12nlogn. Derive the work complexity of the complete bitonic sorter.

d) You know from class that the adaptive bitonic merger has work complexityO n

. What is the overall work complexity of the complete adaptive sorting algorithm?

1

Referenzen

ÄHNLICHE DOKUMENTE

Noch stolzer macht mich allerdings, dass für viele Teilnehmer unsere Konferenz alljährlich zu einem festen Termin geworden ist, der auch ein Treffpunkt und Diskussionsforum ist

All you have to do is implement the body of the kernel reverseArrayBlock(). Launch multiple 256-thread blocks; to reverse an array of size N, you need N/256 blocks.. a) Compute

Show that thread divergence only occurs in the first warp for stride values up to half of the

Space-filling curve: mapping from unit square to unit interval Z-order: map quadrants recursively in order NW, NE, SW, SE.

Das besondere an Bitonic Sort ist, dass die Anzahl zu vergleichenden Elemente un- abh¨ angig von den Daten sind.. Bitonic Sort l¨ aßt sich deshalb in

Natural mergesort executes in the worst case and on average a number of Θ(n log n) comparisons and memory

Natural mergesort executes in the worst case and on average a number of Θ(n log n) comparisons and memory movements..!.

Sorting procedures that are based on comparison require in the worst case and on average at least Ω(n log n) key comparisons.... Comparison