diff --git a/src/singeli/src/bins.singeli b/src/singeli/src/bins.singeli index a5fdeab1..505d91ad 100644 --- a/src/singeli/src/bins.singeli +++ b/src/singeli/src/bins.singeli @@ -134,30 +134,36 @@ fn write_indices{I,T}(t:*I, w:*T, n:u64) : void = { } setlabel{break} } +fn write_indices{I,T & width{I}==8}(t:*I, w:*T, n:u64) : void = { + @for (w over j to n) store{t, w, j+1} +} def bins_lookup{I, T, up, w:*T, wn:u64, x:*T, xn:u64, rp:*void} = { + # Build table def tc = 1< 32) ind = homBlend{homBlend{...each{isel,ui2}, b}, ind, i0 < V**vl} } } - store{*U~~(res+j), 0, ind} + store{*U~~(*T~~rp+j), 0, ind} } goto{done} setlabel{no_bittab} - - max_scan{I, up}(t0, 256) - @for (res, x over xn) res = load{t, x} - setlabel{done} } def bin_search_vec{T, up, w:*T, wn, x:*T, xn, rp, maxwn & hasarch{'AVX2'}} = {