Debian Codegraph @

src/implementation/aarch64/mod.rs

raw symbols SCIP
1 #[cfg(any(feature = "aarch64_neon", target_feature = "neon"))]
2 #[allow(dead_code)]
3 pub(crate) mod neon;
4
5 #[inline]
6 #[cfg(any(feature = "aarch64_neon", target_feature = "neon"))]
7 pub(crate) unsafe fn validate_utf8_basic(input: &[u8]) -> Result<(), crate::basic::Utf8Error> {
8 if input.len() < super::helpers::SIMD_CHUNK_SIZE {
9 return super::validate_utf8_basic_fallback(input);
10 }
11
12 validate_utf8_basic_neon(input)
13 }
14
15 #[inline(never)]
16 #[cfg(any(feature = "aarch64_neon", target_feature = "neon"))]
17 unsafe fn validate_utf8_basic_neon(input: &[u8]) -> Result<(), crate::basic::Utf8Error> {
18 neon::validate_utf8_basic(input)
19 }
20
21 #[cfg(not(any(feature = "aarch64_neon", target_feature = "neon")))]
22 pub(crate) use super::validate_utf8_basic_fallback as validate_utf8_basic;
23
24 #[inline]
25 #[cfg(any(feature = "aarch64_neon", target_feature = "neon"))]
26 pub(crate) unsafe fn validate_utf8_compat(input: &[u8]) -> Result<(), crate::compat::Utf8Error> {
27 if input.len() < super::helpers::SIMD_CHUNK_SIZE {
28 return super::validate_utf8_compat_fallback(input);
29 }
30
31 validate_utf8_compat_neon(input)
32 }
33
34 #[inline(never)]
35 #[cfg(any(feature = "aarch64_neon", target_feature = "neon"))]
36 unsafe fn validate_utf8_compat_neon(input: &[u8]) -> Result<(), crate::compat::Utf8Error> {
37 neon::validate_utf8_compat(input)
38 }
39
40 #[cfg(not(any(feature = "aarch64_neon", target_feature = "neon")))]
41 pub(crate) use super::validate_utf8_compat_fallback as validate_utf8_compat;