1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
use crate::internal::*;
use tract_pulse_opl::ops::PulsedAxisSlice;
impl PulsedOp for PulsedAxisSlice {
    fn pulsed_output_facts(&self, inputs: &[&PulsedFact]) -> TractResult<TVec<PulsedFact>> {
        let mut fact = inputs[0].clone();
        let mut stream = fact.stream.as_mut().unwrap();
        stream.delay += self.skip;
        stream.dim = self.take.clone();
        Ok(tvec!(fact))
    }
    as_op!();
    pulsed_op_to_typed_op!();
}