@@ -221,7 +221,7 @@ impl SumcheckComputationPacked<EF> for PrecompileFootprint {
221221 }
222222
223223 fn eval_packed_base ( & self , point : & [ PFPacking < EF > ] , _: & [ EF ] ) -> EFPacking < EF > {
224- self . air_eval :: < PFPacking < EF > , EFPacking < EF > > ( point, |p, c| EFPacking :: < EF > :: from ( p) * c)
224+ self . air_eval ( point, |p, c| EFPacking :: < EF > :: from ( p) * c)
225225 }
226226}
227227
@@ -230,6 +230,25 @@ pub struct DotProductFootprint {
230230 pub dot_product_challenge : [ EF ; 6 ] ,
231231}
232232
233+ impl DotProductFootprint {
234+ fn air_eval <
235+ PointF : PrimeCharacteristicRing + Copy ,
236+ ResultF : Algebra < EF > + Algebra < PointF > + Copy ,
237+ > (
238+ & self ,
239+ point : & [ PointF ] ,
240+ mul_point_f_and_ef : impl Fn ( PointF , EF ) -> ResultF ,
241+ ) -> ResultF {
242+ ( mul_point_f_and_ef ( point[ 2 ] , self . dot_product_challenge [ 2 ] )
243+ + mul_point_f_and_ef ( point[ 3 ] , self . dot_product_challenge [ 3 ] )
244+ + mul_point_f_and_ef ( point[ 4 ] , self . dot_product_challenge [ 4 ] )
245+ + mul_point_f_and_ef ( point[ 1 ] , self . dot_product_challenge [ 5 ] ) )
246+ * point[ 0 ]
247+ + self . dot_product_challenge [ 1 ]
248+ + self . global_challenge
249+ }
250+ }
251+
233252impl < N : ExtensionField < PF < EF > > > SumcheckComputation < N , EF > for DotProductFootprint
234253where
235254 EF : ExtensionField < N > ,
@@ -239,13 +258,7 @@ where
239258 }
240259
241260 fn eval ( & self , point : & [ N ] , _: & [ EF ] ) -> EF {
242- self . global_challenge
243- + self . dot_product_challenge [ 1 ]
244- + ( self . dot_product_challenge [ 2 ] * point[ 2 ]
245- + self . dot_product_challenge [ 3 ] * point[ 3 ]
246- + self . dot_product_challenge [ 4 ] * point[ 4 ]
247- + self . dot_product_challenge [ 5 ] * point[ 1 ] )
248- * point[ 0 ]
261+ self . air_eval ( point, |p, c| c * p)
249262 }
250263}
251264
@@ -254,10 +267,10 @@ impl SumcheckComputationPacked<EF> for DotProductFootprint {
254267 2
255268 }
256269
257- fn eval_packed_extension ( & self , _point : & [ EFPacking < EF > ] , _: & [ EF ] ) -> EFPacking < EF > {
258- todo ! ( )
270+ fn eval_packed_extension ( & self , point : & [ EFPacking < EF > ] , _: & [ EF ] ) -> EFPacking < EF > {
271+ self . air_eval ( point , |p , c| p * c )
259272 }
260- fn eval_packed_base ( & self , _point : & [ utils:: PFPacking < EF > ] , _: & [ EF ] ) -> EFPacking < EF > {
261- todo ! ( )
273+ fn eval_packed_base ( & self , point : & [ utils:: PFPacking < EF > ] , _: & [ EF ] ) -> EFPacking < EF > {
274+ self . air_eval ( point , |p , c| EFPacking :: < EF > :: from ( p ) * c )
262275 }
263276}
0 commit comments