Remove BMI2 where/compress methods
This commit is contained in:
parent
f005169518
commit
8add95b7ab
@ -155,43 +155,6 @@ fn slash{c, T & hasarch{'X86_64'} & T<=(if (c) i8 else i32)}(w:*u64, x:arg{c,T},
|
||||
}
|
||||
}
|
||||
|
||||
def tab{n,l} = if (n==0) tup{0} else {
|
||||
def m = n-1
|
||||
def k = (1<<l - 1) << (m*l)
|
||||
flat_table{+, tup{0,k}, tab{m,l}}
|
||||
}
|
||||
c16lut:*u64 = tab{4,16}
|
||||
def vgLoad{p:T, i & T == *u64} = emit{eltype{T}, 'vg_loadLUT64', p, i}
|
||||
|
||||
def thresh{c, T==i8 & hasarch{'BMI2'}} = 32
|
||||
def thresh{c, T==i16 & hasarch{'BMI2'}} = 16
|
||||
fn slash{c, T & T<=i16 & hasarch{'BMI2'}}(w:*u64, x:arg{c,T}, r:*T, l:u64, sum:u64) : void = {
|
||||
def wt = width{T}
|
||||
def b = bind{base, 1<<wt}
|
||||
def X = if (c) {
|
||||
xv:= *u64~~x
|
||||
{} => {c:= loadu{xv}; xv+= 1; c}
|
||||
} else {
|
||||
def n = 64/wt
|
||||
x:u64 = b{iota{n}}
|
||||
def add = b{n**n}
|
||||
{} => {c:= x; x+= add; c}
|
||||
}
|
||||
@for_special_buffered{r,8} (w in *u8~~w over sum) {
|
||||
pc:= popc{w}
|
||||
def out{r,e} = storeu{*u64~~r, 0, pext{promote{u64,X{}}, e}}
|
||||
if (wt == 8) {
|
||||
out{r, pdep{promote{u64, w}, u64~~b{8**1}}*255}
|
||||
} else {
|
||||
def step{r, w} = out{r, vgLoad{c16lut, w}}
|
||||
h := w&0xf
|
||||
step{r, h}
|
||||
step{r+popcRand{h}, w>>4}
|
||||
}
|
||||
r+= pc
|
||||
}
|
||||
}
|
||||
|
||||
def thresh{c, T==i8 & hasarch{'AVX2'}} = 32
|
||||
fn slash{c, T==i8 & hasarch{'AVX2'}}(w:*u64, x:arg{c,T}, r:*T, l:u64, sum:u64) : void = {
|
||||
def I = [32]i8
|
||||
|
||||
Loading…
Reference in New Issue
Block a user