| 749 | // => T<_1,_2,T<_3,_4>,_5,_6>{} |
| 750 | template <int B, int E, class T> |
| 751 | CUTE_HOST_DEVICE constexpr |
| 752 | auto |
| 753 | group(T const& t) |
| 754 | { |
| 755 | if constexpr (not is_tuple<T>::value) { |
| 756 | if constexpr (E == -1) { |
| 757 | return group<B,1>(t); |
| 758 | } else { |
| 759 | return detail::construct(t, take<B,E>(t), make_seq<B>{}, make_seq<(B < E)>{}, make_range<E,1>{}); |
| 760 | } |
| 761 | } else |
| 762 | if constexpr (E == -1) { |
| 763 | return group<B,tuple_size<T>::value>(t); |
| 764 | } else |
| 765 | if constexpr (B <= E) { |
| 766 | return detail::construct(t, take<B,E>(t), make_seq<B>{}, make_seq<(B < E)>{}, make_range<E,tuple_size<T>::value>{}); |
| 767 | } else { |
| 768 | static_assert(B <= E); |
| 769 | } |
| 770 | |
| 771 | CUTE_GCC_UNREACHABLE; |
| 772 | } |
| 773 | |
| 774 | // |
| 775 | // Extend a T to rank N by appending/prepending an element |
nothing calls this directly
no test coverage detected