{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

cs8803sc_lecture2

# cs8803sc_lecture2 - CS8803SC Software and Hardware...

This preview shows pages 1–5. Sign up to view the full content.

1 CS8803SC Software and Hardware Cooperative Computing Think Parallel Prof. Hyesoon Kim School of Computer Science Georgia Institute of Technology Today’s goal Let’s have some thoughts about how to write parallel programs. We will learn typical patterns and models in the later lectures.

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

View Full Document
2 Sum Sequential summation algorithm A1 ~ A8 A1 A2 A3 A4 A5 A6 A7 A8 Introduction to parallel algorithms (C. Xavier, S.S Iyengar) Sum Parallel summation algorithm A1 ~ A8 A1 A2 A3 A4 A5 A6 A7 A8 2 processors 3 processors Introduction to parallel algorithms (C. Xavier, S.S Iyengar)
3 Sorting • Bubble-Sort A1 A2 A3 A4 A5 A6 A7 Introduction to parallel algorithms (C. Xavier, S.S Iyengar) Algorithm Bubble-sort Input: A(0:n-1) Output: Sorted array A(O:n-1) 1. For k = 0 to n-1 2. If k is even then (a) for i = 0 to ( n /2) -1 do in parallel (b) If A 2i > A 2i+1 then interchange them (c) End parallel Else (d) For i = 0 to ( n /2) – 2 do in parallel (e) If A 2i+1 > A 2i+2 then interchange them (f) End parallel 3. Next k Introduction to parallel algorithms (C. Xavier, S.S Iyengar)

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

View Full Document
4 Searching • Let A = (a 1 , a 2 , a 3 , … , a n ) be an array of data such that a 1 < a 2 < … < a n . • Find out the index k, such that a
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 9

cs8803sc_lecture2 - CS8803SC Software and Hardware...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online