refactors, boiler for looping read
This commit is contained in:
parent
18a998e737
commit
2f7afe64f6
3 changed files with 21 additions and 7 deletions
10
src/input.zig
Normal file
10
src/input.zig
Normal file
|
@ -0,0 +1,10 @@
|
|||
const std = @import("std");
|
||||
|
||||
const util = @import("util.zig");
|
||||
const threads = @import("threads.zig");
|
||||
|
||||
pub fn main_loop(f: std.fs.File, buffs: util.Buffers, thread_mgr: threads.ThreadManager) !void {
|
||||
_ = thread_mgr;
|
||||
_ = buffs;
|
||||
_ = f;
|
||||
}
|
|
@ -2,6 +2,7 @@ const std = @import("std");
|
|||
|
||||
const util = @import("util.zig");
|
||||
const threads = @import("threads.zig");
|
||||
const input = @import("input.zig");
|
||||
|
||||
const InitError = error{
|
||||
NotEnoughArgs,
|
||||
|
@ -62,4 +63,7 @@ pub fn main() !void {
|
|||
|
||||
var thread_manager = try threads.ThreadManager.init(std.heap.page_allocator, opts.n_quant_jobs);
|
||||
defer thread_manager.deinit();
|
||||
|
||||
var f = std.io.getStdIn();
|
||||
try input.main_loop(f, buffs, thread_manager);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue