Index Mathematics Conjectures nbv lettuce Widgets

extend_to

stdlib/extend_to.nbv

extend_to(target_len, input)

Extend a vector to a target length by appending zeroes. Target length must be greater than or equal to input length.

Calls
calloc
Precompiles
assert_lte!, concat!, len!
Used by
bdlop/bdlop_r1cs_verify, oraccle/oraccle_sample_uniform_vec, oraccle/oraccle_squeeze

Source

# Extend a vector to a target length by appending zeroes.
# Target length must be greater than or equal to input length.
(target_len, input)

assert_lte! (len! input), target_len
static input_len = len! input

concat! input, calloc(target_len - input_len)