tiny.choir.ThreadingOptions
Defined in threading.
API (5)
Actions
Public operations.
Fields and members
Public fields and members.
Source
Source: lib/choir/src/core/threading.zig:4
zig
pub const Options = struct { max_threads: usize = 1, worker_allocator: ?std.mem.Allocator = null, pub fn workerCount(self: Options, item_count: usize) usize { if (item_count == 0) return 1; const configured = if (self.max_threads == 0) sys.thread.cpuCount() else self.max_threads; return @max(@as(usize, 1), @min(configured, item_count)); } pub fn workerAllocator(self: Options, fallback: std.mem.Allocator) std.mem.Allocator { return self.worker_allocator orelse fallback; } pub fn requestsParallelism(self: Options) bool { return self.max_threads == 0 or self.max_threads > 1; }};Source: lib/choir/src/root.zig:43
zig
pub const ThreadingOptions = ir.ThreadingOptions;Also reachable as
backends.wasm.emission.module_encoding.common.ir.ThreadingOptions, backends.wasm.emission.module_encoding.common.ir.threading.Options, ir.ThreadingOptions, ir.threading.Options, passes.PassManagerRunOptions, passes.pass.PassManagerRunOptions.
Audit
| Definitions | 4 |
|---|---|
| Public names | 32 |
| Members | 2 |
| Version | 26.7.0 |
| Revision | daab053ee433 |