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.

add3

limb64.add3
inline fn add3(x: *[3]u64, start: usize, v0: u64) void

File

lib/compiler_rt/limb64.zig:943

Code

inline fn add3(x: *[3]u64, start: usize, v0: u64) void {
    var i = start;
    var v = v0;
    while (i < 3) : (i += 1) {
        const s = @addWithOverflow(x[i], v);
        x[i] = s[0];
        if (s[1] == 0) break;
        v = 1;
    }
}