warp.utils#

Utility functions for array operations, sorting, and function creation.

This module provides GPU-accelerated utility functions for common array operations (scans, reductions, transformations), sorting algorithms (radix sort, segmented sort, run-length encoding), and a utility for creating Warp functions from Python callables.

API#

array_cast

Cast elements from one array to another array with a different data type.

array_inner

Compute the inner product of two arrays.

array_scan

Perform a scan (prefix sum) operation on an array.

array_sum

Compute the sum of array elements.

create_warp_function

Create a Warp function from a Python function.

radix_sort_pairs

Sort key-value pairs using radix sort.

runlength_encode

Perform run-length encoding on an array.

segmented_sort_pairs

Sort key-value pairs within segments.