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

Function flatten

include/cute/algorithm/tuple_algorithms.hpp:564–579  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

562// and leave non-tuple untouched.
563template <class T>
564CUTE_HOST_DEVICE constexpr
565auto
566flatten(T const& t)
567{
568 if constexpr (is_tuple<T>::value) {
569 if constexpr (is_flat<T>::value) { // Shortcut for perf
570 return t;
571 } else {
572 return filter_tuple(t, [](auto const& a) { return flatten_to_tuple(a); });
573 }
574 } else {
575 return t;
576 }
577
578 CUTE_GCC_UNREACHABLE;
579}
580
581namespace detail {
582

Callers 6

copy_unpackMethod · 0.50
copy_unpackMethod · 0.50
make_tma_atom_im2colFunction · 0.50
coalesce_256Function · 0.50
construct_tma_gbasisFunction · 0.50

Calls 2

filter_tupleFunction · 0.70
flatten_to_tupleFunction · 0.70

Tested by

no test coverage detected