Skip to main content

gpu_prefix_sum

Function gpu_prefix_sum 

Source
pub fn gpu_prefix_sum(counts: &[usize]) -> Vec<usize>
Expand description

Exclusive prefix sum (scan) of counts.

For input [a, b, c, d] the output is [0, a, a+b, a+b+c]. This mirrors what a parallel GPU prefix-sum kernel would produce.