Skip to main content

Module gpu_reduction

Module gpu_reduction 

Source
Expand description

GPU reduction and scan operations (CPU mock implementation).

Provides parallel-style reductions (sum, max, min, dot product), exclusive prefix scan, radix sort (counting sort mock), and histogram.

Functionsยง

gpu_dot
Compute the dot product of two equal-length slices (parallel mock).
gpu_histogram
Compute a histogram of the input data over num_bins equal-width bins spanning [min_val, max_val).
gpu_max
Compute the maximum element in a slice (parallel reduction mock).
gpu_min
Compute the minimum element in a slice (parallel reduction mock).
gpu_prefix_sum
Compute the exclusive prefix scan (prefix sum) of a slice.
gpu_sort_radix
Sort a slice of u64 values using a radix sort (counting sort) mock.
gpu_sum
Compute the sum of all elements in a slice (parallel reduction mock).