Comments on: Radix Sort for Humans You're very welcome Tom. Glad it was useful. Please do let us know if there are any topics you would like to see covered here :) You’re very welcome Tom. Glad it was useful. Please do let us know if there are any topics you would like to see covered here :)

]]>
By: Tom/2011/01/28/radix-sort-for-humans/#comment-498 Tom Mon, 31 Jan 2011 16:18:32 +0000 Hi Tom,Thankyou for your extremely kind words. I'm very sorry that my explaination of this part was not adequate. I will attempt to do better here:The auxiliaryArray is just another array of equal size to your unsorted array. It is used as temporary storage during the data movement passes. This is because writing the results of a pass over your original unsorted data will compromise the sort integrity (at least in the case of LSB, it's possible to write an in-place MSB Radix Sort). So you basically "ping-pong" between a couple of buffers (as you have astutely observed) using the auxiliary array as the input to subsequent passes. For an even number of passes, i.e.: an 8-bit Radix for 32bit values, you will end up with the results back in the original array. For an odd number of passes you have the choice of just returning the auxiliary array with the results in or doing an additional memcpy if you really want the data back in-place. I hope this is clearer for you, please let me know if you need any further clarification on these points, :)All the best,Ste Hi Tom,Thankyou for your extremely kind words. I’m very sorry that my explaination of this part was not adequate. I will attempt to do better here:The auxiliaryArray is just another array of equal size to your unsorted array. It is used as temporary storage during the data movement passes. This is because writing the results of a pass over your original unsorted data will compromise the sort integrity (at least in the case of LSB, it’s possible to write an in-place MSB Radix Sort). So you basically “ping-pong” between a couple of buffers (as you have astutely observed) using the auxiliary array as the input to subsequent passes. For an even number of passes, i.e.: an 8-bit Radix for 32bit values, you will end up with the results back in the original array. For an odd number of passes you have the choice of just returning the auxiliary array with the results in or doing an additional memcpy if you really want the data back in-place. I hope this is clearer for you, please let me know if you need any further clarification on these points, :)All the best,Ste

]]>
By: Tom/2011/01/28/radix-sort-for-humans/#comment-496 Tom Mon, 31 Jan 2011 13:57:42 +0000 Few years ago Michael Herf presented an interesting variant of radix sort, operating on 3x 11bit histograms instead of 4×8: Great article. Nice presentation (examples + code + figures). Keep up the good work :) Great article. Nice presentation (examples + code + figures). Keep up the good work :)

]]>
By: Tony Albrecht/2011/01/28/radix-sort-for-humans/#comment-493 Tony Albrecht Fri, 28 Jan 2011 11:10:01 +0000