okami.mom/strata
git clone https://git.nkp.pet/okami.mom/strata
a0b666cff
main
1#pragma once 2#include "strata/core/scr.hpp" 3namespace strata::ds4 { 4template < class A ,class B > 5core::ScrPlan scr_plan (const std::vector < A >& old ,const std::vector < B >& cur ) { 6 core::ScrParams p ; 7p .block = 2 ; 8p .checkpoint_end = false; 9p .extend = 0 ;// (the junction band reads each run's last tokens again) 10auto plan = core::scr_plan (old ,cur , {},p ); 11plan .restore = plan .n_prefix /2 * 2 ; 12plan .restore = std::min < int64_t > (plan .restore , std::max < int64_t > (0 , (int64_t )cur .size ()- 2 ) /2 * 2 ); 13if (plan .restore < 128 )plan .restore = 0 ; 14return plan ; 15} 16}// namespace strata::ds4