refactors, boiler for looping read

This commit is contained in:
Muaz Ahmad 2023-11-27 14:06:31 +05:00
parent 18a998e737
commit 2f7afe64f6
3 changed files with 21 additions and 7 deletions

10
src/input.zig Normal file
View 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;
}

View file

@ -2,6 +2,7 @@ const std = @import("std");
const util = @import("util.zig"); const util = @import("util.zig");
const threads = @import("threads.zig"); const threads = @import("threads.zig");
const input = @import("input.zig");
const InitError = error{ const InitError = error{
NotEnoughArgs, NotEnoughArgs,
@ -62,4 +63,7 @@ pub fn main() !void {
var thread_manager = try threads.ThreadManager.init(std.heap.page_allocator, opts.n_quant_jobs); var thread_manager = try threads.ThreadManager.init(std.heap.page_allocator, opts.n_quant_jobs);
defer thread_manager.deinit(); defer thread_manager.deinit();
var f = std.io.getStdIn();
try input.main_loop(f, buffs, thread_manager);
} }