On Tue, 20 Sep 2022 16:18:25 +0200
Bonita Montero <
Bonita....@gmail.com> wrote:
>I experimented with loop unrolling in C++20 and I found that sometimes
>its the best to to interleaved steps while unrolling. F.e. you load
>multiple values into the registers in the first step, then process
>these values interleaved and then have some interleaved write back.
>This is usually somewhat awkward to program because you have code
>parts which are replicated, usually differing only in some array
>indices of the data you process.
>
>So I extended my unrolling helper, here it is:
>
>template<size_t N, typename ... Fns>
> requires (N >= 1) && (requires( Fns fn ) { { fn.template operator
>()<(size_t)N - 1>() } -> std::same_as<void>; } && ...)