tiny.simd.dataCaches
Defined in tiny.simd.
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
Audit
| Definitions | 1 |
|---|---|
| Public names | 2 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |