void syten::transpose_impl | ( | ConstSpan< Scalar > const | inp, |
MutSpan< Scalar > | out, | ||
ConstSpan< Index > | in_perm, | ||
ConstSpan< Index > | in_dim, | ||
Conj | do_conj = Conj::n() , |
||
bool | do_checks = true , |
||
std::index_sequence< Ranks... > | = {} |
||
) |
Implementation of syten::transpose() below.
Because the effective rank of the transposed array may differ from the original rank due to removal of one-dimensional indices and combination of runs of different indices, we need some tricks to still call the transposition routines with the proper effective rank. This is done by taking a variadic index sequence (generated below by default-constructing one) and then checking whether the effective size of the permutation array is equal to every member and – if so – calling the appropriate transposition routine. Compile times are bit badly affected.