Does someone has a code snippet for sorting an array of floats in CUDA? I have a small shared array of 216 elements and I would like to sort it from ascending to descending.
So, I have something like this:
shared float localArray;
localArray[current] = someValue;
// sorting routine here
My array is quite small and the sorting routine does not have to be very complicated, I guess.
EDIT: Actually, I realized that I need to do the sorting in another kernel, but the sorting bit still remains to be solved…