don't do useless tail case
This commit is contained in:
parent
103f334b3e
commit
95455241a4
@ -93,6 +93,14 @@ def for{vars,begin,end,block} = {
|
||||
i = i+1
|
||||
}
|
||||
}
|
||||
def forNZ{vars,begin,end,block} = {
|
||||
i:u64 = begin
|
||||
assert{i!=end}
|
||||
while (i < end) {
|
||||
exec{i, vars, block}
|
||||
i = i+1
|
||||
}
|
||||
}
|
||||
|
||||
def maxvalue{T & T==u8 } = 0xff
|
||||
def maxvalue{T & T==u16} = 0xffff
|
||||
|
||||
@ -63,11 +63,11 @@ copy{vw, X, R}(x: *u8, r: *u8, l:u64, xRaw: *u8) : void = {
|
||||
} else if (R==u1) {
|
||||
# show{'R==u1', X, R}
|
||||
def XU = ty_u{XV}
|
||||
maskedLoop{bulk, l, {i, M} => {
|
||||
@forNZ (i to cdiv{l,vcount{XV}}) {
|
||||
v:= loadBatch{xp, i, XV}
|
||||
r:= getmask{(XU~~v) == XU~~broadcast{XV,1}}
|
||||
b_setBatch{vcount{XV}, rp, i, r} # TODO something more special for f64
|
||||
}}
|
||||
}
|
||||
} else if (width{X}<=width{R}) {
|
||||
# show{'w{X}<=w{R}', X, R}
|
||||
maskedLoop{bulk, l, {i, M} => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user