@@ -612,31 +612,26 @@ impl Mul<(u32, u32, u32, u32)> for FieldElement2625x4 {
612
612
#[ inline]
613
613
#[ rustfmt:: skip] // Retain formatting of packing
614
614
fn mul ( self , scalars : ( u32 , u32 , u32 , u32 ) ) -> FieldElement2625x4 {
615
- unsafe {
616
- let consts = (
617
- u32x2:: new ( scalars. 0 , scalars. 1 ) ,
618
- u32x2:: new ( scalars. 2 , scalars. 3 ) ,
619
- ) ;
615
+ let consts = (
616
+ u32x2:: new ( scalars. 0 , scalars. 1 ) ,
617
+ u32x2:: new ( scalars. 2 , scalars. 3 ) ,
618
+ ) ;
620
619
621
- let ( b0, b1) = unpack_pair ( self . 0 [ 0 ] ) ;
622
- let ( b2, b3) = unpack_pair ( self . 0 [ 1 ] ) ;
623
- let ( b4, b5) = unpack_pair ( self . 0 [ 2 ] ) ;
624
- let ( b6, b7) = unpack_pair ( self . 0 [ 3 ] ) ;
625
- let ( b8, b9) = unpack_pair ( self . 0 [ 4 ] ) ;
626
-
627
- FieldElement2625x4 :: reduce64 ( [
628
- u64x2x2:: new ( vmull_u32 ( b0. 0 . 0 , consts. 0 . into ( ) ) . into ( ) , vmull_u32 ( b0. 0 . 1 , consts. 1 . into ( ) ) . into ( ) ) ,
629
- u64x2x2:: new ( vmull_u32 ( b1. 0 . 0 , consts. 0 . into ( ) ) . into ( ) , vmull_u32 ( b1. 0 . 1 , consts. 1 . into ( ) ) . into ( ) ) ,
630
- u64x2x2:: new ( vmull_u32 ( b2. 0 . 0 , consts. 0 . into ( ) ) . into ( ) , vmull_u32 ( b2. 0 . 1 , consts. 1 . into ( ) ) . into ( ) ) ,
631
- u64x2x2:: new ( vmull_u32 ( b3. 0 . 0 , consts. 0 . into ( ) ) . into ( ) , vmull_u32 ( b3. 0 . 1 , consts. 1 . into ( ) ) . into ( ) ) ,
632
- u64x2x2:: new ( vmull_u32 ( b4. 0 . 0 , consts. 0 . into ( ) ) . into ( ) , vmull_u32 ( b4. 0 . 1 , consts. 1 . into ( ) ) . into ( ) ) ,
633
- u64x2x2:: new ( vmull_u32 ( b5. 0 . 0 , consts. 0 . into ( ) ) . into ( ) , vmull_u32 ( b5. 0 . 1 , consts. 1 . into ( ) ) . into ( ) ) ,
634
- u64x2x2:: new ( vmull_u32 ( b6. 0 . 0 , consts. 0 . into ( ) ) . into ( ) , vmull_u32 ( b6. 0 . 1 , consts. 1 . into ( ) ) . into ( ) ) ,
635
- u64x2x2:: new ( vmull_u32 ( b7. 0 . 0 , consts. 0 . into ( ) ) . into ( ) , vmull_u32 ( b7. 0 . 1 , consts. 1 . into ( ) ) . into ( ) ) ,
636
- u64x2x2:: new ( vmull_u32 ( b8. 0 . 0 , consts. 0 . into ( ) ) . into ( ) , vmull_u32 ( b8. 0 . 1 , consts. 1 . into ( ) ) . into ( ) ) ,
637
- u64x2x2:: new ( vmull_u32 ( b9. 0 . 0 , consts. 0 . into ( ) ) . into ( ) , vmull_u32 ( b9. 0 . 1 , consts. 1 . into ( ) ) . into ( ) )
638
- ] )
639
- }
620
+ let m = |b : u32x2x2 | -> u64x2x2 {
621
+ unsafe {
622
+ u64x2x2:: new ( vmull_u32 ( b. 0 . 0 , consts. 0 . into ( ) ) . into ( ) , vmull_u32 ( b. 0 . 1 , consts. 1 . into ( ) ) . into ( ) )
623
+ }
624
+ } ;
625
+
626
+ let ( b0, b1) = unpack_pair ( self . 0 [ 0 ] ) ;
627
+ let ( b2, b3) = unpack_pair ( self . 0 [ 1 ] ) ;
628
+ let ( b4, b5) = unpack_pair ( self . 0 [ 2 ] ) ;
629
+ let ( b6, b7) = unpack_pair ( self . 0 [ 3 ] ) ;
630
+ let ( b8, b9) = unpack_pair ( self . 0 [ 4 ] ) ;
631
+
632
+ FieldElement2625x4 :: reduce64 ( [
633
+ m ( b0) , m ( b1) , m ( b2) , m ( b3) , m ( b4) , m ( b5) , m ( b6) , m ( b7) , m ( b8) , m ( b9)
634
+ ] )
640
635
}
641
636
}
642
637
0 commit comments