Skip to documentation
SLOP

tiny.simd.initProcessorTopology

Reference tiny.simd initProcessorTopology

Defined in tiny.simd.

No direct callersNo direct callstiny.simdinitProcessorTopology
Static calls · unresolved targets: 0 · external targets: 6.

Source

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

zig
pub fn init(allocator: std.mem.Allocator) std.mem.Allocator.Error!topology.Topology {    if (comptime builtin.target.os.tag == .linux) {        var records: [topology.max_logical_processors]topology.ProcessorRecord =            undefined;        const count = linux.fillRecords(&records);        if (count == 0) return .{};        var detected = topology.Topology.initFromRecords(            allocator,            records[0..count],        ) catch |err| switch (err) {            error.OutOfMemory => return error.OutOfMemory,            else => return .{},        };        linux.fillClusterCacheSizes(&detected);        return detected;    }    if (comptime builtin.target.os.tag.isDarwin()) {        var records: [topology.max_logical_processors]topology.ProcessorRecord =            undefined;        const count = apple.fillRecords(&records);        if (count == 0) return .{};        return topology.Topology.initFromRecords(            allocator,            records[0..count],        ) catch |err| switch (err) {            error.OutOfMemory => return error.OutOfMemory,            else => return .{},        };    }    if (comptime builtin.target.os.tag == .windows) {        var records: [topology.max_logical_processors]topology.ProcessorRecord =            undefined;        const count = try windows.fillRecords(allocator, &records);        if (count == 0) return .{};        return topology.Topology.initFromRecords(            allocator,            records[0..count],        ) catch |err| switch (err) {            error.OutOfMemory => return error.OutOfMemory,            else => return .{},        };    }    return .{};}

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

zig
pub const initProcessorTopology = topology.init;

Also reachable as

topology.init.

Audit

Definitions1
Public names2
Members0
Version26.7.0
Revisiondaab053ee433