some Singeli cleanup
shuf_ind's staying as such I guess; make it more clear when debug.singeli is left included
This commit is contained in:
parent
bb3bb1b1d3
commit
d5facc33ad
@ -35,7 +35,6 @@ def blend_top{f:T, t:T, m:M if w256i{T,32} and w256i{M,32}} = T ~~ blend_top{v2f
|
||||
def blend_top{f:T, t:T, m:M if w256i{T,64} and w256i{M,64}} = T ~~ blend_top{v2d{f}, v2d{t}, v2d{m}}
|
||||
|
||||
# shuffles
|
||||
# TODO rename to shuf, move shuf to shuf_imm or something
|
||||
def shuf_ind{a:T, b:T=[8]E, {...is} if width{E}==32 and length{is}==8 and ({l,h} => same{l,h-4} and x86_shufps_range{l, 8}){slice{is,0,4}, slice{is,4,8}}} = {
|
||||
vec_shuffle{[4]f32, tup{a, b}, slice{is,0,4} & 3}
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ def new_shuf{...vs0 if isvec{try_same_type{vs0,'!'}}, {...is}} = { # : [length{i
|
||||
def new_shuf{w if istype{w} or knum{w}, ...vs if isvec{try_same_type{vs,'!'}} and (not isvec{w} or width{w} == width{type0{vs}}), {...is}} = {
|
||||
def S = type0{vs}
|
||||
def D = if (isvec{w}) w else re_el{if (isprim{w}) w else ty_u{w}, S}
|
||||
S~~new_shuf{...each{{c} => reinterpret{D, c}, vs}, is}
|
||||
S~~new_shuf{...each{~~{D,.}, vs}, is}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
show{'debug.singeli in use'}
|
||||
include 'debug/printf' # printf & lprintf
|
||||
|
||||
def assert{x:(u1)} = { if (not x) emit{void, '__builtin_trap'} }
|
||||
def test_assert = assert # test_assert is guaranteed to either not exist, or always trap on bad input
|
||||
def test_assert = assert # test_assert is guaranteed to either not exist, or always trap on bad input
|
||||
Loading…
Reference in New Issue
Block a user