rename mask_of in spaced.singeli

otherwise confusable with maskOf in mask.singeli
This commit is contained in:
dzaima 2024-06-26 05:23:41 +03:00
parent 452065adaf
commit 7474e51642

View File

@ -1,14 +1,14 @@
def mask_of{l} = emit{u64, 'get_spaced_mask', l} # see slash.singeli
def spaced_mask_of{l} = emit{u64, 'get_spaced_mask', l} # see slash.singeli
def aligned_spaced_mask{l} = {
assert{l <= 64}
assert{l&(l-1) == 0}
mask_of{l}
spaced_mask_of{l}
}
def unaligned_spaced_mask_mod{l:T} = {
assert{l < 64}
def m = mask_of{l}
def m = spaced_mask_of{l}
def d = cast_i{T, ctz{m}} # = 64%l
tup{m>>d | m<<(l-d), d}
}