pub mod assembly;
pub mod roundtrip_lint;
pub mod fusion;
pub mod select;
pub mod closures;
pub mod hybrid;
#[cfg(feature = "jit")]
pub mod jit;
pub mod cone;
pub mod lattice;
#[cfg(all(test, feature = "jit"))]
mod cone_tests;
macro_rules! ref_readers {
() => {
pub fn read_vec_f32(&self, slot: usize) -> &[f32] {
match self.core.ref_entry(slot) {
crate::ast::ScratchBuf::F32(v) => v,
other => panic!("slot {slot} is not f32-lane scratch: {other:?}"),
}
}
pub fn read_vec_f64(&self, slot: usize) -> &[f64] {
match self.core.ref_entry(slot) {
crate::ast::ScratchBuf::F64(v) => v,
other => panic!("slot {slot} is not f64-lane scratch: {other:?}"),
}
}
pub fn read_vec_f16(&self, slot: usize) -> &[half::f16] {
match self.core.ref_entry(slot) {
crate::ast::ScratchBuf::F16(v) => v,
other => panic!("slot {slot} is not f16-lane scratch: {other:?}"),
}
}
pub fn read_vec_i8(&self, slot: usize) -> &[i8] {
match self.core.ref_entry(slot) {
crate::ast::ScratchBuf::I8(v) => v,
other => panic!("slot {slot} is not i8-lane scratch: {other:?}"),
}
}
pub fn read_vec_i16(&self, slot: usize) -> &[i16] {
match self.core.ref_entry(slot) {
crate::ast::ScratchBuf::I16(v) => v,
other => panic!("slot {slot} is not i16-lane scratch: {other:?}"),
}
}
pub fn read_vec_i32(&self, slot: usize) -> &[i32] {
match self.core.ref_entry(slot) {
crate::ast::ScratchBuf::I32(v) => v,
other => panic!("slot {slot} is not i32-lane scratch: {other:?}"),
}
}
pub fn read_vec_i64(&self, slot: usize) -> &[i64] {
match self.core.ref_entry(slot) {
crate::ast::ScratchBuf::I64(v) => v,
other => panic!("slot {slot} is not i64-lane scratch: {other:?}"),
}
}
};
}
pub(crate) use ref_readers;