use crate::{
input::{error::InputError, Input},
query::JsonString,
result::InputRecorder,
BLOCK_SIZE,
};
pub trait Memmem<'i, 'b, 'r, I: Input, const N: usize> {
fn find_label(
&mut self,
first_block: Option<I::Block<'i, N>>,
start_idx: usize,
label: &JsonString,
) -> Result<Option<(usize, I::Block<'i, N>)>, InputError>;
}
pub(crate) mod nosimd;
pub(crate) mod shared;
#[cfg(target_arch = "x86")]
pub(crate) mod avx2_32;
#[cfg(target_arch = "x86_64")]
pub(crate) mod avx2_64;
#[cfg(target_arch = "x86")]
pub(crate) mod sse2_32;
#[cfg(target_arch = "x86_64")]
pub(crate) mod sse2_64;
pub(crate) trait MemmemImpl {
type Classifier<'i, 'b, 'r, I, R>: Memmem<'i, 'b, 'r, I, BLOCK_SIZE>
where
I: Input + 'i,
I::BlockIterator<'i, 'r, BLOCK_SIZE, R>: 'b,
R: InputRecorder<I::Block<'i, BLOCK_SIZE>> + 'r,
'i: 'r;
fn memmem<'i, 'b, 'r, I, R>(
input: &'i I,
iter: &'b mut I::BlockIterator<'i, 'r, BLOCK_SIZE, R>,
) -> Self::Classifier<'i, 'b, 'r, I, R>
where
I: Input,
R: InputRecorder<I::Block<'i, BLOCK_SIZE>>,
'i: 'r;
}