warp.utils.radix_sort_pairs#

warp.utils.radix_sort_pairs(keys, values, count)[source]#

Sort key-value pairs using radix sort.

This function sorts pairs of arrays based on the keys array, maintaining the key-value relationship. The sort is stable and operates in linear time. The keys and values arrays must be large enough to accommodate 2*`count` elements.

Parameters:
  • keys (array) – Array of keys to sort. Must be of type int32, float32, or int64.

  • values (array) – Array of values to sort along with keys. Must be of type int32.

  • count (int) – Number of elements to sort.

Raises:

RuntimeError – If array storage devices don’t match, if storage size is insufficient, or if data types are unsupported.

Return type:

None