cs8803sc_lecture2 - CS8803SC Software and Hardware...

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

View Full Document Right Arrow Icon
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.
Background image of page 1

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

View Full DocumentRight Arrow Icon
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)
Background image of page 2
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)
Background image of page 3

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

View Full DocumentRight Arrow Icon
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
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/06/2010 for the course CS 8803 taught by Professor Staff during the Spring '08 term at Georgia Institute of Technology.

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 Right Arrow Icon
Ask a homework question - tutors are online