(self, rhs: Self, mut op: impl FnMut(f64, f64) -> f64)
| 117 | |
| 118 | #[inline] |
| 119 | fn zip_f64x2(self, rhs: Self, mut op: impl FnMut(f64, f64) -> f64) -> Self { |
| 120 | let a_bytes = self.0; |
| 121 | let b_bytes = rhs.0; |
| 122 | let mut out_bytes = [0u8; 16]; |
| 123 | |
| 124 | for ((a, b), dst) in a_bytes.chunks_exact(8).zip(b_bytes.chunks_exact(8)).zip(out_bytes.chunks_exact_mut(8)) { |
| 125 | let a_lane = f64::from_bits(u64::from_le_bytes([a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7]])); |
| 126 | let b_lane = f64::from_bits(u64::from_le_bytes([b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7]])); |
| 127 | dst.copy_from_slice(&op(a_lane, b_lane).to_bits().to_le_bytes()); |
| 128 | } |
| 129 | |
| 130 | Self(out_bytes) |
| 131 | } |
| 132 | } |
no test coverage detected