64 inline static void accumulate(ContainerOverSubrelations& evals,
65 const AllEntities& in,
67 const FF& scaling_factor)
70 using CoefficientAccumulator =
typename Accumulator::CoefficientAccumulator;
72 auto w_l_m = CoefficientAccumulator(in.w_l);
73 auto w_4_m = CoefficientAccumulator(in.w_4);
74 auto q_arith_m = CoefficientAccumulator(in.q_arith);
75 auto q_m_m = CoefficientAccumulator(in.q_m);
77 auto q_arith_sub_1 = q_arith_m -
FF(1);
78 auto scaled_q_arith = q_arith_m * scaling_factor;
83 auto w_4_shift_m = CoefficientAccumulator(in.w_4_shift);
84 auto w_r_m = CoefficientAccumulator(in.w_r);
85 auto w_o_m = CoefficientAccumulator(in.w_o);
86 auto q_l_m = CoefficientAccumulator(in.q_l);
87 auto q_r_m = CoefficientAccumulator(in.q_r);
88 auto q_o_m = CoefficientAccumulator(in.q_o);
89 auto q_4_m = CoefficientAccumulator(in.q_4);
90 auto q_c_m = CoefficientAccumulator(in.q_c);
92 static const FF neg_half =
FF(-2).invert();
94 auto tmp0 = Accumulator(w_r_m * w_l_m * neg_half) * Accumulator((q_arith_m - 3) * q_m_m);
95 auto tmp1 = (q_l_m * w_l_m) + (q_r_m * w_r_m) + (q_o_m * w_o_m) + (q_4_m * w_4_m) + q_c_m;
96 tmp1 += q_arith_sub_1 * w_4_shift_m;
98 std::get<0>(evals) += (tmp0 + Accumulator(tmp1)) * Accumulator(scaled_q_arith);
104 auto w_l_shift_m = CoefficientAccumulator(in.w_l_shift);
106 auto tmp_0 = w_l_m + w_4_m - w_l_shift_m + q_m_m;
107 auto tmp_1 = tmp_0 * (q_arith_m -
FF(2));
108 auto tmp_2 = q_arith_sub_1 * scaled_q_arith;
109 std::get<1>(evals) += ShortAccumulator(tmp_1) * ShortAccumulator(tmp_2);