Sorting Networks Part 1 - Intro to Parallel Programming

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Assuming that swapping two values takes some additional time, I'd say the answer is C<D <B<A. The number of comparisons is the same in all cases, but with C we have to swap basically everything and with A we don't have to swap anything at all. Let me know if I'm right :)

TheDarkever
Автор

:)
1) list merging - Try look on INPUT as sorted list with one number. 8 numbers = 8 sorted list with 1 number. Merge sorted list 1-1 (forst with first in listA, in listB) to new array. 1-1, 1-1, 1-1, 1-1 = 2-2, 2-2 = 4-4 = sorted = 7 compares, can do paralel
2) list merging - [1], when you find sorted list ASC and DESC ordered. Merge sorted list
3) insert middle - insert sort, when compare middle of sorted subarray (noc can use paralel, but do lowest comparations)

petermlich
Автор

Great video. Explains it very clearly.

xCAFEFD
Автор

Sounds like Jordan Peterson doing computer science 🙃 .... "If the network isn't sorting, you're not trying hard enough. Sorting is hard. Deal with it."

firosuke
Автор

Awesome, learnt a lot about sorting networks from this paper.

dreamscapeai
Автор

Good video, i understood very step, i will program this algorithm in CUDA, sorry my bad English

Arnoldo
Автор

Doesn't this still require control flow changes? Gpus might be parallel power houses but if the codepaths diverge often it will slow it down by orders of magnitude. And of course it would be a synchronization nightmare on multicore cpus...

tacchinotacchi
Автор

Do you mean that sorting networks can't sort a non bitonic sequence?

davenirline