This commit is contained in:
2025-12-13 02:15:28 +01:00
commit dbec2e9a74
58 changed files with 6177 additions and 0 deletions

1
src/utils/mod.rs Normal file
View File

@@ -0,0 +1 @@
pub mod toolbox;

9
src/utils/toolbox.rs Normal file
View File

@@ -0,0 +1,9 @@
pub fn number_of_cpus() -> usize {
match std::thread::available_parallelism() {
Ok(n) => n.get(),
Err(_) => {
eprintln!("Warning: Could not determine number of CPUs, defaulting to 1");
1
}
}
}