55 inline static void accumulate(ContainerOverSubrelations& accumulators,
56 const AllEntities& in,
58 const FF& scaling_factor)
61 using CoefficientAccumulator =
typename Accumulator::CoefficientAccumulator;
66 auto w_1_shift = Accumulator(CoefficientAccumulator(in.w_l_shift));
67 auto w_2_shift = Accumulator(CoefficientAccumulator(in.w_r_shift));
68 auto w_3_shift = Accumulator(CoefficientAccumulator(in.w_o_shift));
69 auto w_4_shift = Accumulator(CoefficientAccumulator(in.w_4_shift));
70 auto op_wire_1 = Accumulator(CoefficientAccumulator(in.ecc_op_wire_1));
71 auto op_wire_2 = Accumulator(CoefficientAccumulator(in.ecc_op_wire_2));
72 auto op_wire_3 = Accumulator(CoefficientAccumulator(in.ecc_op_wire_3));
73 auto op_wire_4 = Accumulator(CoefficientAccumulator(in.ecc_op_wire_4));
74 auto lagrange_ecc_op = Accumulator(CoefficientAccumulator(in.lagrange_ecc_op));
77 auto lagrange_by_scaling = lagrange_ecc_op * scaling_factor;
78 auto complement_ecc_op_by_scaling = -lagrange_by_scaling + scaling_factor;
81 auto tmp = op_wire_1 - w_1_shift;
82 tmp *= lagrange_by_scaling;
86 tmp = op_wire_2 - w_2_shift;
87 tmp *= lagrange_by_scaling;
91 tmp = op_wire_3 - w_3_shift;
92 tmp *= lagrange_by_scaling;
96 tmp = op_wire_4 - w_4_shift;
97 tmp *= lagrange_by_scaling;
101 tmp = op_wire_1 * complement_ecc_op_by_scaling;
105 tmp = op_wire_2 * complement_ecc_op_by_scaling;
109 tmp = op_wire_3 * complement_ecc_op_by_scaling;
113 tmp = op_wire_4 * complement_ecc_op_by_scaling;