Skip to main content

Module utils

Module utils 

Source

Functions§

batch_multiplicative_inverse_allowing_zero
Calculates and returns the multiplicative inverses of each field element, with zero values remaining unchanged.
batch_multiplicative_inverse_serial
Batch multiplicative inverses with Montgomery’s trick This is Montgomery’s trick. At a high level, we invert the product of the given field elements, then derive the individual inverses from that via multiplication.
disable_debug_builder
Disables the debug builder so there are not debug assert panics. Commonly used in negative tests to prevent panics.
parallelize_chunks
This utility function will parallelize an operation that is to be performed over a mutable slice.