Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

processAndAbsorbNLeaves

kangarootwelve.processAndAbsorbNLeaves
inline fn processAndAbsorbNLeaves(
    comptime Variant: type,
    comptime N: usize,
    view: *const MultiSliceView,
    j: usize,
    leaf_buffer: []u8,
    final_state: anytype,
) void

File

lib/std/crypto/kangarootwelve.zig:653

Code

inline fn processAndAbsorbNLeaves(
    comptime Variant: type,
    comptime N: usize,
    view: *const MultiSliceView,
    j: usize,
    leaf_buffer: []u8,
    final_state: anytype,
) void {
    const cv_size = Variant.cv_size;
    if (view.tryGetSlice(j, j + N * chunk_size)) |leaf_data| {
        var leaf_cvs: [N * cv_size]u8 align(cache_line_size) = undefined;
        processLeaves(Variant, N, leaf_data, &leaf_cvs);
        final_state.update(&leaf_cvs);
    } else {
        view.copyRange(j, j + N * chunk_size, leaf_buffer[0 .. N * chunk_size]);
        var leaf_cvs: [N * cv_size]u8 align(cache_line_size) = undefined;
        processLeaves(Variant, N, leaf_buffer[0 .. N * chunk_size], &leaf_cvs);
        final_state.update(&leaf_cvs);
    }
}