1 / 102

Sorting Networks

Sorting Networks. Sorting. 4. 10. 9. 9. 3. 8. 1. 7. 4. 2. 3. 10. 2. 8. 1. 7. Sorting Network. (Bitonic Sorting Network). Sorting Network. (Bitonic Sorting Network). Comparator. max(x,y). x. min(x,y). y. Comparator. max. 1. 9. 9. 1. min. Comparator. max. 100.

Download Presentation

Sorting Networks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Sorting Networks

  2. Sorting 4 10 9 9 3 8 1 7 4 2 3 10 2 8 1 7

  3. Sorting Network (Bitonic Sorting Network)

  4. Sorting Network (Bitonic Sorting Network)

  5. Comparator max(x,y) x min(x,y) y

  6. Comparator max 1 9 9 1 min

  7. Comparator max 100 100 4 4 min

  8. Levels 1 2 3 Width = 4 Depth = 3

  9. 1 8 2 5

  10. 8 1 5 2 Level 1

  11. 8 5 1 2 Level 2

  12. 8 5 2 1 Level 3

  13. Input Output 1 8 8 5 2 2 5 1

  14. Input Output 4 10 9 9 3 8 1 7 2 4 10 3 8 2 7 1

  15. levels 2 1 3 4 5 6 4 10 9 9 3 8 1 7 2 4 10 3 8 2 7 1

  16. Recursive construction of Bitonic Sorting Network Sort(n) Sort(n/2) In Merge(n) Out Sort(n/2) depth

  17. Recursive construction of merging network Merge(n) Merge(n/2) Merge(n/2) depth

  18. Induction Basis Sort(2) Merge(2)

  19. Width Sorting network depth: Merger width Total depth

  20. Counting Networks

  21. The Counting Problem 0 Shared variable

  22. Token = Increment request 0 Shared variable

  23. Increment request 0 1 Shared variable

  24. 1 Shared variable

  25. Increment request 1 Shared variable

  26. Increment request 1 2 Shared variable

  27. 2 Shared variable

  28. Increment request 2 Shared variable

  29. Increment request 2 3 Shared variable

  30. Sequential Bottleneck 2 3 1 4 0 5 6 Shared variable The requests have to be serialized

  31. Counting Network Outputs Inputs

  32. Counting Network

  33. Balancer Token Outputs Inputs

  34. Balancer Outputs Inputs

  35. Balancer

  36. Balancer

  37. Balancer

  38. Balancer

  39. Balancer

  40. Balancer

  41. Balancer All tokens together

  42. Balancer Step property

  43. Balancer Step property Another example

  44. Balancer Step property Another example

  45. Balancer Step property Another example

  46. Counting Network (Bitonic Counting Network)

  47. Counting Network

  48. Counting Network

  49. Counting Network

More Related