Metafunction used when creating nested deep slices views to remap the slices received in a .slice<> operation. More...
Public Types | |
using | new_as_tuple = typename tuple_ops::from_index_sequence< NewSlices >::type |
using | outer_as_tuple = typename tuple_ops::from_index_sequence< OuterSlices >::type |
using | projected = typename tuple_ops::result_of::heterogeneous_filter< new_as_tuple, outer_as_tuple >::type |
using | diff = typename tuple_ops::result_of::difference< outer_as_tuple, projected >::type |
using | remaining = typename detail::discard_from_sequence< typename tuple_ops::to_index_sequence< projected >::type, typename tuple_ops::from_index_sequence< make_index_sequence< D > >::type >::type |
using | type = typename find_first_indices< diff, remaining >::type |
Metafunction used when creating nested deep slices views to remap the slices received in a .slice<> operation.
For example, consider a 5D view (v) with a slices_view<0,2,4> on top of it (sv). If this slices view receives a slice<0,2> call, then the new slices view that is created would need to remap these new slices (NewSlices) based on the old slices (OuterSlices) and the original view's dimension.
slices_view<0,2,4>.slice<0,2>(my_5d_view);
In this case, the new slices <0,2> will be remapped into <1>.
This is because <0,2> refers to <0,4> in sv, leaving the middle element (<2>) to be free. Since the original view's 5D space is really <0,1,2,3,4>, we drop <0, 4>, leaving <1,2,3>. Now we find where the remaining element (2) is in this list. Its position is 1, therefore, the remapped slices will be <1>.
OuterSlices | An index_sequence of slices from the original slices view. |
NewSlices | An index_sequence of slices of slices that is being requested |
D | The dimensionality of the view beneath the original slices view. |