79 inline static void accumulate(ContainerOverSubrelations& evals,
80 const AllEntities& in,
82 const FF& scaling_factor)
85 using CoefficientAccumulator =
typename Accumulator::CoefficientAccumulator;
87 auto w_l_m = CoefficientAccumulator(in.w_l);
88 auto w_4_m = CoefficientAccumulator(in.w_4);
89 auto q_arith_m = CoefficientAccumulator(in.q_arith);
90 auto q_m_m = CoefficientAccumulator(in.q_m);
92 auto q_arith_sub_1 = q_arith_m -
FF(1);
93 auto scaled_q_arith = q_arith_m * scaling_factor;
97 auto w_4_shift_m = CoefficientAccumulator(in.w_4_shift);
98 auto w_r_m = CoefficientAccumulator(in.w_r);
99 auto w_o_m = CoefficientAccumulator(in.w_o);
100 auto q_l_m = CoefficientAccumulator(in.q_l);
101 auto q_r_m = CoefficientAccumulator(in.q_r);
102 auto q_o_m = CoefficientAccumulator(in.q_o);
103 auto q_4_m = CoefficientAccumulator(in.q_4);
104 auto q_c_m = CoefficientAccumulator(in.q_c);
106 static const FF neg_half =
FF(-2).invert();
108 auto tmp0 = Accumulator(w_r_m * w_l_m * neg_half) * Accumulator((q_arith_m - 3) * q_m_m);
109 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;
110 tmp1 += q_arith_sub_1 * w_4_shift_m;
112 std::get<0>(evals) += (tmp0 + Accumulator(tmp1)) * Accumulator(scaled_q_arith);
117 auto w_l_shift_m = CoefficientAccumulator(in.w_l_shift);
119 auto tmp_0 = w_l_m + w_4_m - w_l_shift_m + q_m_m;
120 auto tmp_1 = tmp_0 * (q_arith_m -
FF(2));
121 auto tmp_2 = q_arith_sub_1 * scaled_q_arith;
122 std::get<1>(evals) += ShortAccumulator(tmp_1) * ShortAccumulator(tmp_2);