Partition `[0, total)` into half-open ranges of at most `shard_consts` items each. `shard_consts == 0` or `>= total` returns one shard.
(total: u32, shard_consts: u32)
| 291 | total: u32, |
| 292 | /// Total target constants across this env's work items. |
| 293 | target_count: usize, |
| 294 | } |
| 295 | |
| 296 | fn load_env_bytes(ixe: Option<&PathBuf>) -> Vec<u8> { |
| 297 | match ixe { |
| 298 | Some(path) => fs::read(path).expect("read ixe input"), |
| 299 | None => { |
| 300 | let env = IxonEnv::new(); |
| 301 | let mut buf = Vec::new(); |
| 302 | env.put(&mut buf).expect("env.put"); |
| 303 | buf |
| 304 | }, |
| 305 | } |
| 306 | } |
| 307 | |
| 308 | /// Partition `[0, total)` into half-open ranges of at most |