60 inline static void accumulate(ContainerOverSubrelations& accumulators,
61 const AllEntities& in,
63 const FF& scaling_factor)
66 using CoefficientAccumulator =
typename Accumulator::CoefficientAccumulator;
71 auto w_1_shift = Accumulator(CoefficientAccumulator(in.w_l_shift));
72 auto w_2_shift = Accumulator(CoefficientAccumulator(in.w_r_shift));
73 auto w_3_shift = Accumulator(CoefficientAccumulator(in.w_o_shift));
74 auto w_4_shift = Accumulator(CoefficientAccumulator(in.w_4_shift));
75 auto op_wire_1 = Accumulator(CoefficientAccumulator(in.ecc_op_wire_1));
76 auto op_wire_2 = Accumulator(CoefficientAccumulator(in.ecc_op_wire_2));
77 auto op_wire_3 = Accumulator(CoefficientAccumulator(in.ecc_op_wire_3));
78 auto op_wire_4 = Accumulator(CoefficientAccumulator(in.ecc_op_wire_4));
79 auto lagrange_ecc_op = Accumulator(CoefficientAccumulator(in.lagrange_ecc_op));
83 auto lagrange_by_scaling = lagrange_ecc_op * scaling_factor;
84 auto complement_ecc_op_by_scaling = -lagrange_by_scaling + scaling_factor;
87 auto tmp = op_wire_1 - w_1_shift;
88 tmp *= lagrange_by_scaling;
92 tmp = op_wire_2 - w_2_shift;
93 tmp *= lagrange_by_scaling;
97 tmp = op_wire_3 - w_3_shift;
98 tmp *= lagrange_by_scaling;
102 tmp = op_wire_4 - w_4_shift;
103 tmp *= lagrange_by_scaling;
107 tmp = op_wire_1 * complement_ecc_op_by_scaling;
111 tmp = op_wire_2 * complement_ecc_op_by_scaling;
115 tmp = op_wire_3 * complement_ecc_op_by_scaling;
119 tmp = op_wire_4 * complement_ecc_op_by_scaling;