Parallel Sort Algorithm

前端 未结 5 762
星月不相逢
星月不相逢 2020-11-28 05:00

I\'m looking for a simple implementation of a parallelized (multi-threaded) sort algorithm in C# that can operate on List or Arrays, and possibly using

5条回答
  •  青春惊慌失措
    2020-11-28 05:27

    Divide the list you need sorted into equal sized sublists, depending on how many processors you have, and then whenever two parts are done, merge them together to a new part, until there is only one left and all threads completed. Very simple you should be able to implement it yourself, and sorting the lists within each thread can be done using any existing sort algorithm (like in the library).

提交回复
热议问题