MCPcopy Create free account
hub / github.com/argumentcomputer/ix / plan_shards

Function plan_shards

zisk/host/src/main.rs:293–305  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

291 total: u32,
292 /// Total target constants across this env's work items.
293 target_count: usize,
294}
295
296fn 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

Callers 1

plan_inputFunction · 0.85

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected