(self, rhs: Self, mut op: impl FnMut(f32, f32) -> f32)
| 90 | |
| 91 | #[inline] |
| 92 | fn zip_f32x4(self, rhs: Self, mut op: impl FnMut(f32, f32) -> f32) -> Self { |
| 93 | let a_bytes = self.0; |
| 94 | let b_bytes = rhs.0; |
| 95 | let mut out_bytes = [0u8; 16]; |
| 96 | |
| 97 | for ((a, b), dst) in a_bytes.chunks_exact(4).zip(b_bytes.chunks_exact(4)).zip(out_bytes.chunks_exact_mut(4)) { |
| 98 | let a_lane = f32::from_bits(u32::from_le_bytes([a[0], a[1], a[2], a[3]])); |
| 99 | let b_lane = f32::from_bits(u32::from_le_bytes([b[0], b[1], b[2], b[3]])); |
| 100 | dst.copy_from_slice(&op(a_lane, b_lane).to_bits().to_le_bytes()); |
| 101 | } |
| 102 | |
| 103 | Self(out_bytes) |
| 104 | } |
| 105 | |
| 106 | #[inline] |
| 107 | fn map_f64x2(self, mut op: impl FnMut(f64) -> f64) -> Self { |
no test coverage detected