accept tuple argument in homMask
This commit is contained in:
parent
8c111c2189
commit
d85f628d72
@ -171,6 +171,7 @@ def homMask{...vs if length{vs}>1} = {
|
||||
def h = n/2
|
||||
(sl{h} << (h * k)) | sl{0,h}
|
||||
}
|
||||
def homMask{x if ktup{x}} = homMask{...x}
|
||||
|
||||
if_inline (hasarch{'X86_64'}) {
|
||||
include 'arch/iintrinsic/basic'
|
||||
|
||||
@ -73,10 +73,10 @@ def any2bit{VT=[k]T, unr, op0, wS, wV, xS, xV, dst:(*u64), len:(ux)} = {
|
||||
{(__ne) if isint{T}} => __eq
|
||||
{_} => op0
|
||||
}
|
||||
def mask = if (same{op0, op}) homMask else ({...x} => ~homMask{...x})
|
||||
def mask = if (same{op0, op}) homMask else ({x} => ~homMask{x})
|
||||
|
||||
@forNZ (ri to cdiv{len,bulk}) {
|
||||
b_setBatch{bulk, dst, ri, mask{...each{{j}=>op{wV{xi+j}, xV{xi+j}}, iota{unr}}}}
|
||||
b_setBatch{bulk, dst, ri, mask{each{{j}=>op{wV{xi+j}, xV{xi+j}}, iota{unr}}}}
|
||||
xi+= unr
|
||||
}
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@ fn copy{X, R}(x: *void, r: *void, l:u64, xRaw: *void) : void = {
|
||||
def bulk2 = bulk*unr
|
||||
xi:ux = 0
|
||||
@forNZ (i to cdiv{l,bulk2}) {
|
||||
b_setBatch{bulk2, rp, i, homMask{...each{{i} => op{loadBatch{xp, xi+i, XV}}, iota{unr}}}}
|
||||
b_setBatch{bulk2, rp, i, homMask{each{{i} => op{loadBatch{xp, xi+i, XV}}, iota{unr}}}}
|
||||
xi+= unr
|
||||
}
|
||||
} else if (width{X}<=width{R}) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user