mod bool;
mod primitive;
use vortex_error::VortexResult;
use vortex_error::vortex_panic;
use super::Interleave;
use crate::array::Array;
use crate::executor::ExecutionCtx;
use crate::executor::ExecutionResult;
pub(super) fn execute(
array: Array<Interleave>,
ctx: &mut ExecutionCtx,
) -> VortexResult<ExecutionResult> {
if array.dtype().is_boolean() {
bool::execute(array, ctx)
} else if array.dtype().is_primitive() {
primitive::execute(array, ctx)
} else {
vortex_panic!(
"interleave execution is not implemented for value dtype {}",
array.dtype()
)
}
}