Skip to documentation
SLOP

tiny.simd.mismatch

Reference tiny.simd mismatch

Defined in algo.

Returns the index of the first lane where two equal-length spans differ, or their length when every lane agrees.

Called byCallsprivate sourcelib.simd.src.algoexpectSpanOrderprivate sourcelib.simd.src.algorequireIntegerprivate sourcelib.simd.src.algovectorMismatchprivate sourcelib.simd.src.algowordMismatchalgomismatch
Static calls · unresolved targets: 0 · external targets: 0.

Source

Source: lib/simd/src/algo.zig:172

zig
/// Returns the index of the first lane where two equal-length spans differ,/// or their length when every lane agrees. Whole vectors compare first, and/// the last vector overlaps lanes already known equal. A byte span shorter/// than a vector compares eight bytes at a time the same way.pub fn mismatch(comptime D: type, left: []const D.Lane, right: []const D.Lane) usize {    requireInteger(D.Lane, "mismatch");    std.debug.assert(left.len == right.len);    if (left.len >= D.lane_count) return vectorMismatch(D, left, right);    if (D.Lane == u8 and left.len >= word_bytes) return wordMismatch(left, right);    for (left, right, 0..) |first, second, index| {        if (first != second) return index;    }    return left.len;}

Source: lib/simd/src/root.zig:463

zig
pub const mismatch = algo.mismatch;

Audit

Definitions1
Public names2
Members0
Version26.7.0
Revisiondaab053ee433