Skip to documentation
SLOP

tiny.simd.minRange

Reference tiny.simd minRange

Defined in robust.

Called byCallsrobustmodeOfSortedtest sourcelib.simd.src.robusttest: Highway robust half-sample mode...private sourcelib.simd.src.robustrequireUnsignedIntegerrobustminRange
Static calls · unresolved targets: 0 · external targets: 0.

Source

Source: lib/simd/src/robust.zig:55

zig
pub fn minRange(    comptime T: type,    sorted: []const T,    index_begin: usize,    half_count: usize,) usize {    comptime requireUnsignedInteger(T);    std.debug.assert(half_count != 0);    std.debug.assert(index_begin <= sorted.len);    std.debug.assert(half_count <= (sorted.len - index_begin) / 2);    var min_range: T = std.math.maxInt(T);    var min_index = index_begin;    for (index_begin..index_begin + half_count) |index| {        std.debug.assert(sorted[index] <= sorted[index + half_count]);        const range = sorted[index + half_count] - sorted[index];        if (range < min_range) {            min_range = range;            min_index = index;        }    }    return min_index;}

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

zig
pub const minRange = robust.minRange;

Audit

Definitions1
Public names2
Members0
Version26.7.0
Revisiondaab053ee433