File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -922,9 +922,8 @@ mod tests {
922922 }
923923
924924 // Row r, lane c = r*16 + c. A transpose must yield row r, lane c = c*16 + r.
925- let mut m: [ U32x16 ; 16 ] = core:: array:: from_fn ( |r| {
926- U32x16 :: from_array ( core:: array:: from_fn ( |c| ( r * 16 + c) as u32 ) )
927- } ) ;
925+ let mut m: [ U32x16 ; 16 ] =
926+ core:: array:: from_fn ( |r| U32x16 :: from_array ( core:: array:: from_fn ( |c| ( r * 16 + c) as u32 ) ) ) ;
928927
929928 stage :: < 1 > ( & mut m) ;
930929 stage :: < 2 > ( & mut m) ;
@@ -954,10 +953,8 @@ mod tests {
954953 4 => va. exchange :: < 4 > ( vb) ,
955954 _ => va. exchange :: < 8 > ( vb) ,
956955 } ;
957- let want_lo: [ u32 ; 16 ] =
958- core:: array:: from_fn ( |c| if c & g == 0 { a[ c] } else { b[ c ^ g] } ) ;
959- let want_hi: [ u32 ; 16 ] =
960- core:: array:: from_fn ( |c| if c & g != 0 { b[ c] } else { a[ c ^ g] } ) ;
956+ let want_lo: [ u32 ; 16 ] = core:: array:: from_fn ( |c| if c & g == 0 { a[ c] } else { b[ c ^ g] } ) ;
957+ let want_hi: [ u32 ; 16 ] = core:: array:: from_fn ( |c| if c & g != 0 { b[ c] } else { a[ c ^ g] } ) ;
961958 assert_eq ! ( lo. to_array( ) , want_lo, "exchange::<{g}> lo" ) ;
962959 assert_eq ! ( hi. to_array( ) , want_hi, "exchange::<{g}> hi" ) ;
963960 }
You can’t perform that action at this time.
0 commit comments