MCPcopy Create free account
hub / github.com/NVIDIA/cutlass / group

Function group

include/cute/algorithm/tuple_algorithms.hpp:751–772  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

749// => T<_1,_2,T<_3,_4>,_5,_6>{}
750template <int B, int E, class T>
751CUTE_HOST_DEVICE constexpr
752auto
753group(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

Callers

nothing calls this directly

Calls 1

constructFunction · 0.85

Tested by

no test coverage detected