pub(crate) const ISA_SCALAR: u8 = 0;
#[cfg(target_arch = "x86_64")]
pub(crate) const ISA_AVX2: u8 = 1;
#[cfg(target_arch = "x86_64")]
pub(crate) const ISA_AVX512: u8 = 2;
#[cfg(target_arch = "aarch64")]
pub(crate) const ISA_NEON: u8 = 3;
pub(crate) enum Window {
Copy(usize),
#[allow(dead_code)]
Rewrite { consumed: usize, out: [u8; 192], len: usize },
}
pub(crate) trait Formula {
fn unchanged(&self, text: &str, at_start: bool) -> Option<usize>;
fn write_scalar(&self, text: &str, at_start: bool, out: &mut String) -> usize;
#[inline(always)]
fn try_window<const ISA: u8>(&self, bytes: &[u8], at_start: bool) -> Option<Window> {
let _ = (bytes, at_start);
None
}
fn drive(&self, text: &str, at_start: bool, out: &mut String) -> bool {
crate::kernel::apply(self, text, at_start, out)
}
}