Always use vectors for for_special_buffered buffer copy
This commit is contained in:
parent
8add95b7ab
commit
2f6a8e55a1
@ -74,10 +74,10 @@ def for_special_buffered{r, write_len}{vars,begin,sum,iter} = {
|
||||
buf_used = 1; goto{restart}
|
||||
}
|
||||
} else {
|
||||
def vc = 256/tw;
|
||||
if (hasarch{'AVX2'} and write_len >= vc) {
|
||||
if (hasarch{'X86_64'} | hasarch{'AARCH64'}) {
|
||||
def vc = (if (hasarch{'AVX2'}) 256 else 128)/tw;
|
||||
def R = [vc]T
|
||||
if (ov>vc and end-buf>vc) { store{*R~~r0, 0, load{*R~~buf}}; r0+=vc; buf+=vc }
|
||||
@unroll ((ov/vc)>>0) if (end-buf>vc) { store{*R~~r0, 0, load{*R~~buf}}; r0+=vc; buf+=vc }
|
||||
homMaskStoreF{*R~~r0, maskOf{R, end-buf}, load{*R~~buf}}
|
||||
} else {
|
||||
@for (r0, buf over u64~~(end-buf)) r0 = buf
|
||||
|
||||
@ -47,8 +47,8 @@ def topBlend{f:T, t:T, m:M & w128{T} & w128i{M,32}} = T ~~ emit{[4]f32, '_mm_ble
|
||||
def topBlend{f:T, t:T, m:M & w128{T} & w128i{M,64}} = T ~~ emit{[2]f64, '_mm_blendv_pd', v2d{f}, v2d{t}, v2d{m}}
|
||||
def topBlend{f:T, t:T, m:M & w128{T} & w128i{M, 8}} = T ~~ emit{[16]i8, '_mm_blendv_epi8', v2i{f}, v2i{t}, v2i{m}}
|
||||
# assumes all bits are the same in each mask item
|
||||
def homBlend{f:T, t:T, m:M & w128{T} & w128{M} & elwidth{M}!=16} = topBlend{f, t, m}
|
||||
def homBlend{f:T, t:T, m:M & w128{T} & w128{M,16}} = topBlend{f, t, [16]i8~~m}
|
||||
def homBlend{f:T, t:T, m:M & hasarch{'SSE4.1'} & w128{T} & w128{M} & elwidth{M}!=16} = topBlend{f, t, m}
|
||||
def homBlend{f:T, t:T, m:M & hasarch{'SSE4.1'} & w128{T} & w128{M,16}} = topBlend{f, t, [16]i8~~m}
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user