Minor Singeli simplifications

This commit is contained in:
Marshall Lochbaum 2024-05-25 17:49:17 -04:00
parent 90863851b7
commit 56944b8985
2 changed files with 2 additions and 3 deletions

View File

@ -169,8 +169,7 @@ def homMask{...vs if length{vs}>1} = {
def RT = ty_u{max{8,k*n}}
def sl{...a} = promote{RT, homMask{...slice{vs,...a}}}
def h = n/2
def a = sl{0,h}
(sl{h} << (h * k)) | a
(sl{h} << (h * k)) | sl{0,h}
}
if_inline (hasarch{'X86_64'}) {

View File

@ -93,7 +93,7 @@ def loaduBitRaw{x:(*u64), i} = {
loadu{*u64~~((*u8~~x) + (i>>3))} >> (i&7)
}
def loaduBit{x:(*u64), i, n} = {
assert{(n<58) | ((n==58 or n==60) & (i%n == 0))}
assert{n<58 or ((n==58 or n==60) and (i%n == 0))}
loaduBitRaw{x, i}
}
def loaduBitTrunc{x:(*u64), i, n if knum{n}} = truncBits{n, loaduBit{x, i, n}}