okami.mom/strata
git clone https://git.nkp.pet/okami.mom/strata
fd19246dc
main
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 , 6const int32_t * counts ,int n_groups ,int tile ) { 7 std::vector < LatPseudoGroup > out ; 8if (blobs == nullptr || starts == nullptr || counts == nullptr || n_groups <=0 || tile <=0 )return out ; 9for (int g = 0 ;g < n_groups ;++ g ) { 10const int32_t c = counts [g ]; 11for (int32_t off = 0 ;off < c ;off += tile ) { 12out .push_back ({blobs [g ], (int32_t ) (starts [g ]+ off ), (int32_t ) (c - off < tile ?c - off :tile )}); 13 } 14 } 15return out ; 16} 17 18}// namespace strata::prefill