Function radix_sort_prefix_sum

Function Documentation

status_t radix_sort_prefix_sum(const size_t *arr, size_t n_elts, size_t digit, size_t base, size_t *prefix_sums)

Count how many values are less than arr[i] for digit.

Parameters:
  • arr – The array to sort.

  • n_elts – # elements in arr.

  • digit – Current digit being processed.

  • base – The base of the numbers to be sorted; must be <= 16.

  • prefix_sums – Empty array of same cardinality as arr to store prefix sums in.