fn prefixScan(comptime op: std.builtin.ReduceOp, comptime hop: isize, vec: anytype) @TypeOf(vec)

Returns a vector whose elements are the result of performing the specified operation on the corresponding element of the input vector and every hop’th element that came before it (or after, if hop is negative). Supports the same operations as the @reduce() builtin. Takes O(logN) to compute. The scan is not linear, which may affect floating point errors. This may affect the determinism of algorithms that use this function.

Parameters

hop: isize,
vec: anytype,