From ff9bb258c25828319e7106ffef73ac10aa8c2a3a Mon Sep 17 00:00:00 2001 From: dzaima Date: Wed, 19 Jul 2023 18:50:01 +0300 Subject: [PATCH] more comments in slash.singeli --- src/singeli/src/slash.singeli | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/singeli/src/slash.singeli b/src/singeli/src/slash.singeli index d3a00a0d..c4c71aeb 100644 --- a/src/singeli/src/slash.singeli +++ b/src/singeli/src/slash.singeli @@ -38,15 +38,20 @@ def maketab{l,w,s} = { top<<(l*w-w+s) | bot # Overlaps for all-1 value only } def maketab{l,w} = maketab{l,w,0} -# 2KB table shared by many methods -itab:*u64 = maketab{8,8} + +itab:*u64 = maketab{8,8} # 256 elts, 2KB; shared by many methods # Recover popcount, for when POPCNT isn't there def has_popc = hasarch{'POPCNT'} def tab_popc{i:I, w} = (i>>(width{I}-w) + 1) & (1<=i32}(wp:*u64, x:arg{c,T}, r:*T, l:u64, sum:u64) : void = { @@ -237,6 +247,7 @@ fn slash{c, T & hasarch{'AVX2'} & T>=i32}(wp:*u64, x:arg{c,T}, r:*T, l:u64, sum: } } +# everything; 512 bits/iter; AVX-512 compress def thresh{c, T==i8 & hasarch{'AVX512VBMI2'}} = 256 def thresh{c, T==i16 & hasarch{'AVX512VBMI2'}} = 128 def thresh{c, T==i32 & hasarch{'AVX512F'}} = 64