(v: std::arch::x86_64::__m256)
| 104 | /// Horizontal sum of 8 × f32 in a __m256. |
| 105 | #[target_feature(enable = "avx2")] |
| 106 | unsafe fn hsum256(v: std::arch::x86_64::__m256) -> f32 { |
| 107 | use std::arch::x86_64::*; |
| 108 | let hi = _mm256_extractf128_ps(v, 1); |
| 109 | let lo = _mm256_castps256_ps128(v); |
| 110 | let sum128 = _mm_add_ps(lo, hi); |
| 111 | let shuf = _mm_movehdup_ps(sum128); |
| 112 | let sums = _mm_add_ps(sum128, shuf); |
| 113 | let shuf2 = _mm_movehl_ps(sums, sums); |
| 114 | let sums2 = _mm_add_ss(sums, shuf2); |
| 115 | _mm_cvtss_f32(sums2) |
| 116 | } |
no outgoing calls
no test coverage detected