Skip to content

Commit

Permalink
with less shuf
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBlueMatt committed Dec 16, 2023
1 parent a47bce8 commit a19cad6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lightning/src/util/simd_f32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,10 @@ mod x86_sse {
let res_b = _mm256_unpackhi_epi32(lo, zeros);

let suma = _mm256_add_epi64(res_a, res_b);
let res_a = _mm256_unpacklo_epi64(suma, zeros);
let res_b = _mm256_unpackhi_epi64(suma, zeros);

let sumb = _mm256_add_epi64(res_a, res_b);

let mut res_bytes = AlignedInts([0; 4]);
_mm256_store_si256(&mut res_bytes.0[0] as *mut u64 as *mut __m256i, sumb);
res_bytes.0[0] + res_bytes.0[2]
_mm256_store_si256(&mut res_bytes.0[0] as *mut u64 as *mut __m256i, suma);
res_bytes.0[0] + res_bytes.0[1] + res_bytes.0[2] + res_bytes.0[3]
}
}
}
Expand Down

0 comments on commit a19cad6

Please sign in to comment.