Skip to documentation
SLOP

tiny.simd.mirror

Reference tiny.simd mirror

Defined in image.

Called byCallsNo direct callsWrapMirrorcalltest sourcelib.simd.src.image.testtest: pinned Highway mirror and row w...imagemirror
Static calls · unresolved targets: 0 · external targets: 0.

Source

Source: lib/simd/src/image/root.zig:531

zig
pub fn mirror(coord: i64, size: usize) usize {    std.debug.assert(size != 0);    std.debug.assert(size <= std.math.maxInt(i64));    const size_u64: u64 = @intCast(size);    const period = 2 * size_u64;    const phase = if (coord >= 0)        @as(u64, @intCast(coord)) % period    else blk: {        const bits: u64 = @bitCast(coord);        const remainder = (0 -% bits) % period;        break :blk if (remainder == 0) 0 else period - remainder;    };    if (phase < size_u64) return @intCast(phase);    return @intCast(period - 1 - phase);}

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

zig
pub const mirror = image.mirror;

Audit

Definitions1
Public names2
Members0
Version26.7.0
Revisiondaab053ee433