disable Singeli bitwiden on SSE2
This commit is contained in:
parent
f356ba0f36
commit
f6c52ef3b3
@ -167,6 +167,7 @@ def el_s{V=[_]T} = re_el{w_h{T}, V}
|
|||||||
# vector definitions
|
# vector definitions
|
||||||
def arch_defvw = if (hasarch{'AVX2'}) 256 else 128
|
def arch_defvw = if (hasarch{'AVX2'}) 256 else 128
|
||||||
def has_simd = hasarch{'X86_64'} or hasarch{'AARCH64'}
|
def has_simd = hasarch{'X86_64'} or hasarch{'AARCH64'}
|
||||||
|
def has_sel = hasarch{'AVX2'} or hasarch{'AARCH64'}
|
||||||
def fast_BMI2{} = hasarch{'BMI2'} and not SLOW_PDEP
|
def fast_BMI2{} = hasarch{'BMI2'} and not SLOW_PDEP
|
||||||
|
|
||||||
# test if vector has a specific width & element type
|
# test if vector has a specific width & element type
|
||||||
|
|||||||
@ -23,19 +23,21 @@ def table{w} = each{bitsel_i{w, .}, tup{u8, u16, u32, u64}}
|
|||||||
|
|
||||||
exportT{'simd_bitsel', table{arch_defvw}}
|
exportT{'simd_bitsel', table{arch_defvw}}
|
||||||
|
|
||||||
fn bitwiden_n_8(src:*void, dst:*void, csz:ux, cam:ux) : void = {
|
(if (has_sel) {
|
||||||
assert{cam>0}
|
fn bitwiden_n_8(src:*void, dst:*void, csz:ux, cam:ux) : void = {
|
||||||
assert{(csz>1) & (csz<8)}
|
assert{cam>0}
|
||||||
def bulk = arch_defvw / 8
|
assert{(csz>1) & (csz<8)}
|
||||||
def V = [bulk]u8
|
def bulk = arch_defvw / 8
|
||||||
bitalign{tup{2,8,csz}, 8, {s, align} => {
|
def V = [bulk]u8
|
||||||
@maskedLoop{bulk}(dst in tup{V,*u8~~dst} over cam) {
|
bitalign{tup{2,8,csz}, 8, {s, align} => {
|
||||||
dst = align{load{*V~~src}}
|
@maskedLoop{bulk}(dst in tup{V,*u8~~dst} over cam) {
|
||||||
ptr_add{u8, src, bulk*s/8}
|
dst = align{load{*V~~src}}
|
||||||
}
|
ptr_add{u8, src, bulk*s/8}
|
||||||
}}
|
}
|
||||||
}
|
}}
|
||||||
export{'si_bitwiden_n_8', bitwiden_n_8}
|
}
|
||||||
|
export{'si_bitwiden_n_8', bitwiden_n_8}
|
||||||
|
})
|
||||||
|
|
||||||
(if (hasarch{'AARCH64'}) {
|
(if (hasarch{'AARCH64'}) {
|
||||||
fn bitnarrow_8_n(src:*void, dst:*void, csz:ux, cam:ux) : void = {
|
fn bitnarrow_8_n(src:*void, dst:*void, csz:ux, cam:ux) : void = {
|
||||||
|
|||||||
@ -3,8 +3,6 @@ def __shr{(u16)}{a:T, b} = T~~(re_el{u16,a}>>b)
|
|||||||
def broadcast{[(n*2)]E, x:[n]E} = pair{x, x}
|
def broadcast{[(n*2)]E, x:[n]E} = pair{x, x}
|
||||||
def pow2_up{v, least} = max{least, 1<<ceil_log2{v}} # least ⌈ ⌈⌾(2⊸⋆⁼) v
|
def pow2_up{v, least} = max{least, 1<<ceil_log2{v}} # least ⌈ ⌈⌾(2⊸⋆⁼) v
|
||||||
|
|
||||||
def has_sel = hasarch{'AVX2'} or hasarch{'AARCH64'}
|
|
||||||
|
|
||||||
# make a LUT of at least nt elements in tab, to be indexed by [ni_real≥ni]u8
|
# make a LUT of at least nt elements in tab, to be indexed by [ni_real≥ni]u8
|
||||||
# E must be unsigned
|
# E must be unsigned
|
||||||
# mode is a hint on expected usage:
|
# mode is a hint on expected usage:
|
||||||
|
|||||||
@ -138,7 +138,7 @@ static NOINLINE B zeroPadToCellBits0(B x, usz lr, usz cam, usz pcsz, usz ncsz) {
|
|||||||
// TODO widen 8/16-bit cells to 16/32 via cpyC(16|32)Arr
|
// TODO widen 8/16-bit cells to 16/32 via cpyC(16|32)Arr
|
||||||
if (ncsz<=64 && (ncsz&(ncsz-1)) == 0) {
|
if (ncsz<=64 && (ncsz&(ncsz-1)) == 0) {
|
||||||
u64 tmsk = (1ull<<pcsz)-1;
|
u64 tmsk = (1ull<<pcsz)-1;
|
||||||
#if SINGELI_SIMD
|
#if SINGELI_AARCH64 || SINGELI_AVX2
|
||||||
if (ncsz==8) {
|
if (ncsz==8) {
|
||||||
si_bitwiden_n_8(xp, rp, pcsz, cam);
|
si_bitwiden_n_8(xp, rp, pcsz, cam);
|
||||||
goto decG_ret;
|
goto decG_ret;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user