Skip to documentation
SLOP

tiny.simd.dataCaches

Reference tiny.simd dataCaches

Defined in tiny.simd.

No direct callersNo direct callstiny.simddataCaches
Static calls · unresolved targets: 0 · external targets: 8.

Source

Source: lib/simd/src/topology/native.zig:133

zig
pub fn dataCaches() ?*const [4]topology.Cache {    const state = cache_state.load(.acquire);    if (state != 0) return if (state == 1) &cache_storage else null;    while (!cache_guard.tryLock()) std.atomic.spinLoopHint();    defer cache_guard.unlock();    const locked_state = cache_state.load(.monotonic);    if (locked_state == 0) {        const detected = if (comptime builtin.target.os.tag == .linux)            linux.dataCaches()        else if (comptime builtin.target.os.tag.isDarwin())            apple.dataCaches()        else if (comptime builtin.target.os.tag == .windows)            windows.dataCaches()        else            null;        if (detected) |caches| {            cache_storage = caches;            cache_state.store(1, .release);        } else {            cache_state.store(2, .release);        }    }    return if (cache_state.load(.acquire) == 1) &cache_storage else null;}

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

zig
pub const dataCaches = topology.dataCaches;

Also reachable as

topology.dataCaches.

Audit

Definitions1
Public names2
Members0
Version26.7.0
Revisiondaab053ee433