Function reduce_slice_plane

Source
pub fn reduce_slice_plane<P: ReducePrecision, I: List<Line<P::EI>>, R: ReduceInstruction<P>>(
    items: &I,
    inst: &R,
    range: ReduceRange,
    line_size: u32,
    line_mode: LineMode,
    bound_checks: BoundChecksInner,
) -> R::AccumulatorItem
Expand description

Use an individual plane to reduce the items with the specified range. That is, this will reduces items[range.start], items[range.start + range.step] until items[range.end] (exclusive).

This reduces using the given line_mode but doesn’t reduce the accumulator itself.

This assumes that UNIT_POS_X provides the index of unit with a plane and that CUBE_DIM_X is the plane dimension. That is, the cube_dim is CubeDim::new_2d(plane_dim, plane_count).

Since each individual plane performs a reduction, this function is meant to be called with either a different items for each plane, a different range or both based on the absolute plane position (CUBE_POS * CUBE_DIM_Y + UNIT_POS_Y).