MCPcopy Create free account
hub / github.com/arkworks-rs/poly-commit / ceil_div

Function ceil_div

poly-commit/src/utils.rs:42–45  ·  view source on GitHub ↗

Return ceil(x / y).

(x: usize, y: usize)

Source from the content-addressed store, hash-verified

40
41/// Return ceil(x / y).
42pub(crate) fn ceil_div(x: usize, y: usize) -> usize {
43 // XXX. warning: this expression can overflow.
44 (x + y - 1) / y
45}
46
47#[derive(Derivative, CanonicalSerialize, CanonicalDeserialize)]
48#[derivative(Default(bound = ""), Clone(bound = ""), Debug(bound = ""))]

Callers 6

commit_foldingMethod · 0.85
open_foldingMethod · 0.85
lenMethod · 0.85
get_num_bytesFunction · 0.85
compute_dimensionsMethod · 0.85
defaultMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected