use fast path for sequence generation in old CK (#1993)

This commit is contained in:
Max Podkorytov
2025-03-25 11:28:44 -07:00
committed by GitHub
parent d49abdaa87
commit 1a58522f01

View File

@@ -256,6 +256,18 @@ struct arithmetic_sequence_gen
using type = typename conditional<kHasContent, type0, type1>::type;
};
template <index_t IEnd>
struct arithmetic_sequence_gen<0, IEnd, 1>
{
template <typename T, T... Ints>
struct WrapSequence
{
using type = Sequence<Ints...>;
};
// https://reviews.llvm.org/D13786
using type = typename __make_integer_seq<WrapSequence, index_t, IEnd>::type;
};
// uniform sequence
template <index_t NSize, index_t I>
struct uniform_sequence_gen