| 2019 | #pragma region Core Functionality |
| 2020 | |
| 2021 | SZ_DYNAMIC sz_cptr_t sz_find_byte(sz_cptr_t haystack, sz_size_t h_length, sz_cptr_t needle) { |
| 2022 | #if SZ_USE_SKYLAKE |
| 2023 | return sz_find_byte_skylake(haystack, h_length, needle); |
| 2024 | #elif SZ_USE_HASWELL |
| 2025 | return sz_find_byte_haswell(haystack, h_length, needle); |
| 2026 | #elif SZ_USE_WESTMERE |
| 2027 | return sz_find_byte_westmere(haystack, h_length, needle); |
| 2028 | #elif SZ_USE_SVE // ? actually faster than NEON on most machines |
| 2029 | return sz_find_byte_sve(haystack, h_length, needle); |
| 2030 | #elif SZ_USE_NEON |
| 2031 | return sz_find_byte_neon(haystack, h_length, needle); |
| 2032 | #else |
| 2033 | return sz_find_byte_serial(haystack, h_length, needle); |
| 2034 | #endif |
| 2035 | } |
| 2036 | |
| 2037 | SZ_DYNAMIC sz_cptr_t sz_rfind_byte(sz_cptr_t haystack, sz_size_t h_length, sz_cptr_t needle) { |
| 2038 | #if SZ_USE_SKYLAKE |
no test coverage detected
searching dependent graphs…