okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

waveringanaedge0-strata: add the engine for Edge0 145B and Edge0 120Bfd19246dc

main
728 B18 linesraw
1#include "strata/prefill/lat_pseudo_groups.hpp"
2
3namespace strata::prefill {
4
5std::vector<LatPseudoGroup> flatten_groups(const unsigned long long* blobs, const int32_t* starts,
6                                           const int32_t* counts, int n_groups, int tile) {
7    std::vector<LatPseudoGroup> out;
8    if (blobs == nullptr || starts == nullptr || counts == nullptr || n_groups <= 0 || tile <= 0) return out;
9    for (int g = 0; g < n_groups; ++g) {
10        const int32_t c = counts[g];
11        for (int32_t off = 0; off < c; off += tile) {
12            out.push_back({blobs[g], (int32_t) (starts[g] + off), (int32_t) (c - off < tile ? c - off : tile)});
13        }
14    }
15    return out;
16}
17
18}  // namespace strata::prefill