Successfully reported this slideshow.

More Related Content

Related Audiobooks

Free with a 14 day trial from Scribd

See all

BitonicSortSIMD

  1. 1. 1 Bitonic Sort in Shared SIMD Array Processor Anukul Chandra Panda, Pankaj K Sa {pandaa,pankajksa}@nitrkl.ac.in Banshidhar Majhi bmajhi@nitrkl.ac.in Presented By : Dilruk G.A. (148209B) Jagoda S.D. (148214K)
  2. 2. Index …  Background of Sorting  SIMD Array Processor  Bitonic Sort Algorithm  Conclusion 2
  3. 3. Background of Sorting  Sorting of data is needed everywhere • Data Structures, Joins in databases, Searching Algorithms  Simple algorithms required O(n2) • Selection Sort, Insertion Sort, Bubble Sort  Even advanced algorithm take O(nLogn) • Merge Sort, Heap Sort, Cube Sort  Parallel sorting solve the problem • Bitonic Sort, Parallel Merge Sort 3
  4. 4. SIMD Array Processor  Special purpose processor • Ex: multi core, GPU  Single Instruction , Multiple Data • One instruction work on multiple data items simultaneously 4  Single Program Counter  Multiple Processing Elements (PEs)
  5. 5. Bitonic Sorting Algorithm  List A: (3, 4, 7, 8) monotonically increasing.  List B: (6, 5, 2, 1) monotonically decreasing.  List AB: (3, 4, 7, 8, 6, 5, 2, 1) Bitonic list.  Bitonic list is two monotonic lists concatenated together, one increasing and one decreasing.  For n elements n/2 comparators are using.  Repeatedly build Bitonic lists and then sort them.  Just logn stages are required to sort the Bitonic list. 5
  6. 6. Bitonic Sorting Algorithm 6
  7. 7. Time Complexity  In line 2 a shared memory access is needed.  Line 26 need one more operation to write data back to the array.  Within nested loop 2 memory references are multiplied 7
  8. 8. Bitonic Sort 12 15 16 14 13 17 11 10 8x monotonic lists: 16,11,14,10,17,15,12,13 4x bitonic lists: (16,11),(14,10),(17,15),(12,13)
  9. 9. Bitonic Sort 12 15 16 14 13 17 11 10 8x monotonic lists: 16,11,14,10,17,15,12,13 4x bitonic lists: (16,11),(14,10),(17,15),(12,13)
  10. 10. Bitonic Sort 12 15 16 14 13 17 11 10 13 17 11 14 12 15 16 10 4x monotonic lists: (11,16),(14,10),(15,17),(13,12) 2x bitonic lists: (11,16,14,10),(15,17,13,12)
  11. 11. Bitonic Sort 12 15 16 14 13 17 11 10 13 17 11 14 12 15 16 10 4x monotonic lists: (11,16),(14,10),(15,17),(13,12) 2x bitonic lists: (11,16,14,10),(15,17,13,12)
  12. 12. Bitonic Sort 12 15 16 14 13 17 11 10 13 17 11 14 12 15 16 10 13 17 11 14 12 15 10 16 4x monotonic lists: (11,16),(14,10),(15,17),(13,12) 2x bitonic lists: (11,16,14,10),(15,17,13,12)
  13. 13. Bitonic Sort 12 15 16 14 13 17 11 10 13 17 11 14 12 15 16 10 13 17 11 14 12 15 10 16 13 15 10 14 12 17 11 16 2x monotonic lists: (10,11,14,16),(17,15,13,12) 1x bitonic lists: (10,11,14,16,17,15,13,12)
  14. 14. Bitonic Sort 12 15 16 14 13 17 11 10 13 17 11 14 12 15 16 10 13 17 11 14 12 15 10 16 13 15 10 14 12 17 11 16 sorting
  15. 15. Bitonic Sort 12 15 16 14 13 17 11 10 13 17 11 14 12 15 16 10 13 17 11 14 12 15 10 16 14 15 10 13 16 17 11 12 13 15 10 14 12 17 11 16 sorting
  16. 16. Bitonic Sort 12 15 16 14 13 17 11 10 13 17 11 14 12 15 16 10 13 17 11 14 12 15 10 16 14 15 10 13 16 17 11 12 13 15 10 14 12 17 11 16 sorting
  17. 17. Bitonic Sort 12 15 16 14 13 17 11 10 13 17 11 14 12 15 16 10 13 17 11 14 12 15 10 16 14 15 10 13 16 17 11 12 17 15 10 13 16 14 11 12 13 15 10 14 12 17 11 16 sorting
  18. 18. Bitonic Sort 12 15 16 14 13 17 11 10 13 17 11 14 12 15 16 10 13 17 11 14 12 15 10 16 14 15 10 13 16 17 11 12 17 15 10 13 16 14 11 12 13 15 10 14 12 17 11 16 sorting
  19. 19. Bitonic Sort 12 15 16 14 13 17 11 10 Done 13 17 11 14 12 15 16 10 13 17 11 14 12 15 10 16 14 15 10 13 16 17 11 12 17 15 10 13 16 14 11 12 16 15 10 12 17 14 11 13 13 15 10 14 12 17 11 16
  20. 20. Bitonic Sorting Example … 20
  21. 21. Bitonic Sorting Example … 21
  22. 22. Bitonic Sorting Example Tuesday, June 16, 2015 22
  23. 23. 23

×