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

Function build_g_array

crates/ffi/src/aiur/protocol.rs:662–668  ·  view source on GitHub ↗

Build a Lean `Array G` from a slice of field elements.

(values: &[G])

Source from the content-addressed store, hash-verified

660 // Admit-when-alone: a shard whose estimate alone exceeds the
661 // budget must still run (by itself) rather than deadlock.
662 while *used > 0 && *used + bytes > self.budget {
663 used = self.cv.wait(used).unwrap();
664 }
665 *used += bytes;
666 }
667
668 fn release(&self, bytes: usize) {
669 *self.reserved.lock().unwrap() -= bytes;
670 self.cv.notify_all();
671 }

Calls 2

lenMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected