The current implementation of xview_stepper assumes a uniform step_size per slice, and adds it to the underlying iterator when stepping. This is somehow equivalent to a strided view.
However, if we want to implement slices such as "contains indices" or "drop indices" (i.e. slices that check that the given index is or is not in a given list), this implementation needs to be improved. For now, the only solution I see is to add a parameter to the step_size method of the slices, this parameter being the current index in the given dimension.
That implies tracking the full index in the stepper view (meaning additional memory allocation) and thus I wonder if going for an xindex_stepper could be more efficient.
The current implementation of
xview_stepper
assumes a uniformstep_size
per slice, and adds it to the underlying iterator when stepping. This is somehow equivalent to a strided view.However, if we want to implement slices such as "contains indices" or "drop indices" (i.e. slices that check that the given index is or is not in a given list), this implementation needs to be improved. For now, the only solution I see is to add a parameter to the
step_size
method of the slices, this parameter being the current index in the given dimension.That implies tracking the full index in the stepper view (meaning additional memory allocation) and thus I wonder if going for an
xindex_stepper
could be more efficient.