What is the fastest way to sort the values in a smooth 2D array?
The input is a small filtered image:
- about 60 by 80 pixels
- single channel
- single or double precision float
- row major storage, sequential in memory
- values have mixed sign
- piecewise "smooth", with regions on the order of 10 pixels wide
Output is a flat (about 4800 value) array of the sorted values, along with the indices that sort the original array.