58 inline static void accumulate(ContainerOverSubrelations& accumulators,
59 const AllEntities& in,
61 const FF& scaling_factor)
64 using CoefficientAccumulator =
typename Accumulator::CoefficientAccumulator;
69 auto w_1_shift = Accumulator(CoefficientAccumulator(in.w_l_shift));
70 auto w_2_shift = Accumulator(CoefficientAccumulator(in.w_r_shift));
71 auto w_3_shift = Accumulator(CoefficientAccumulator(in.w_o_shift));
72 auto w_4_shift = Accumulator(CoefficientAccumulator(in.w_4_shift));
73 auto op_wire_1 = Accumulator(CoefficientAccumulator(in.ecc_op_wire_1));
74 auto op_wire_2 = Accumulator(CoefficientAccumulator(in.ecc_op_wire_2));
75 auto op_wire_3 = Accumulator(CoefficientAccumulator(in.ecc_op_wire_3));
76 auto op_wire_4 = Accumulator(CoefficientAccumulator(in.ecc_op_wire_4));
77 auto lagrange_ecc_op = Accumulator(CoefficientAccumulator(in.lagrange_ecc_op));
81 auto lagrange_by_scaling = lagrange_ecc_op * scaling_factor;
82 auto complement_ecc_op_by_scaling = -lagrange_by_scaling + scaling_factor;
85 auto tmp = op_wire_1 - w_1_shift;
86 tmp *= lagrange_by_scaling;
90 tmp = op_wire_2 - w_2_shift;
91 tmp *= lagrange_by_scaling;
95 tmp = op_wire_3 - w_3_shift;
96 tmp *= lagrange_by_scaling;
100 tmp = op_wire_4 - w_4_shift;
101 tmp *= lagrange_by_scaling;
105 tmp = op_wire_1 * complement_ecc_op_by_scaling;
109 tmp = op_wire_2 * complement_ecc_op_by_scaling;
113 tmp = op_wire_3 * complement_ecc_op_by_scaling;
117 tmp = op_wire_4 * complement_ecc_op_by_scaling;