1use crate::isa::InstructionSet;
2use crate::vector::V64;
3
4#[cfg(any(all(feature = "unstable", target_arch = "arm"), target_arch = "aarch64"))]
5use crate::isa::NEON;
6
7#[cfg(any(all(feature = "unstable", target_arch = "arm"), target_arch = "aarch64"))]
8use core::mem::transmute as t;
9
10#[cfg(all(feature = "unstable", target_arch = "arm"))]
11use core::arch::arm::*;
12
13#[cfg(target_arch = "aarch64")]
14use core::arch::aarch64::*;
15
16pub unsafe trait SIMD64: InstructionSet {
17 #[inline(always)]
18 #[must_use]
19 fn u8x8_unzip_even(self, a: V64, b: V64) -> V64 {
20 #[cfg(all(feature = "unstable", target_arch = "arm"))]
21 if matches_isa!(Self, NEON) {
22 return unsafe { t(vuzp_u8(t(a), t(b)).0) };
23 }
24 #[cfg(target_arch = "aarch64")]
25 if matches_isa!(Self, NEON) {
26 return unsafe { t(vuzp1_u8(t(a), t(b))) };
27 }
28 {
29 let _ = (a, b);
30 unreachable!()
31 }
32 }
33}