use core::arch::x86_64::__m128i;
use crate::memmem::{
prefilter::{PrefilterFnTy, PrefilterState},
NeedleInfo,
};
const _: PrefilterFnTy = find;
#[target_feature(enable = "sse2")]
pub(crate) unsafe fn find(
prestate: &mut PrefilterState,
ninfo: &NeedleInfo,
haystack: &[u8],
needle: &[u8],
) -> Option<usize> {
super::super::genericsimd::find::<__m128i>(
prestate,
ninfo,
haystack,
needle,
super::super::simple_memchr_fallback,
)
}
#[cfg(all(test, feature = "std"))]
mod tests {
#[test]
#[cfg(not(miri))]
fn prefilter_permutations() {
use crate::memmem::prefilter::tests::PrefilterTest;
unsafe { PrefilterTest::run_all_tests(super::find) };
}
}