Module Barrett_reduction.Config

type t = {
approx_msb_multiplier_config : Approx_msb_multiplier.Config.t;(*

Configuration of approx_msb_mult for stage 1.

*)
half_multiplier_config : Half_width_multiplier.Config.t;(*

Configuration of half_width_mult for stage 2.

*)
subtracter_stages : int;
num_correction_steps : int;(*

The number of correction steps required to do fine reduction. This number should be chosen based on the approximation error possible due to `approx_msb_mult`

*)
include_fine_reduction : bool;(*

When false, omits stage 4. This is useful to delay fine reduction until absolutely necessary.

*)
}
val latency : t -> int

Latency of the barrett reduction module for the given config.

val for_bls12_377 : t

A specially tuned value for our zprize submission for bls12-377 MSM