59 inline static void accumulate(ContainerOverSubrelations& accumulators,
60 const AllEntities& in,
62 const FF& scaling_factor)
65 using CoefficientAccumulator =
typename Accumulator::CoefficientAccumulator;
70 auto w_1_shift = Accumulator(CoefficientAccumulator(in.w_l_shift));
71 auto w_2_shift = Accumulator(CoefficientAccumulator(in.w_r_shift));
72 auto w_3_shift = Accumulator(CoefficientAccumulator(in.w_o_shift));
73 auto w_4_shift = Accumulator(CoefficientAccumulator(in.w_4_shift));
74 auto op_wire_1 = Accumulator(CoefficientAccumulator(in.ecc_op_wire_1));
75 auto op_wire_2 = Accumulator(CoefficientAccumulator(in.ecc_op_wire_2));
76 auto op_wire_3 = Accumulator(CoefficientAccumulator(in.ecc_op_wire_3));
77 auto op_wire_4 = Accumulator(CoefficientAccumulator(in.ecc_op_wire_4));
78 auto lagrange_ecc_op = Accumulator(CoefficientAccumulator(in.lagrange_ecc_op));
82 auto lagrange_by_scaling = lagrange_ecc_op * scaling_factor;
83 auto complement_ecc_op_by_scaling = -lagrange_by_scaling + scaling_factor;
86 auto tmp = op_wire_1 - w_1_shift;
87 tmp *= lagrange_by_scaling;
91 tmp = op_wire_2 - w_2_shift;
92 tmp *= lagrange_by_scaling;
96 tmp = op_wire_3 - w_3_shift;
97 tmp *= lagrange_by_scaling;
101 tmp = op_wire_4 - w_4_shift;
102 tmp *= lagrange_by_scaling;
106 tmp = op_wire_1 * complement_ecc_op_by_scaling;
110 tmp = op_wire_2 * complement_ecc_op_by_scaling;
114 tmp = op_wire_3 * complement_ecc_op_by_scaling;
118 tmp = op_wire_4 * complement_ecc_op_by_scaling;