Skip to content

Radix sort: handle more data types

Signed integers are currently mishandled:

>>> arr = cl.array.to_device(queue, np.array([-1, -2, 0], dtype=np.int32))
>>> RadixSort(ctx, ["int *arr"], "arr[i]", ["arr"], key_dtype=np.int32)(arr)
([array([ 0, -2, -1], dtype=int32)], <pyopencl._cl.Event object at 0x12e2da1a8>)

IEEE floating point could also be handled.

Edited by Andreas Klöckner
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information