rename mask_of in spaced.singeli
otherwise confusable with maskOf in mask.singeli
This commit is contained in:
parent
452065adaf
commit
7474e51642
@ -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} = {
|
def aligned_spaced_mask{l} = {
|
||||||
assert{l <= 64}
|
assert{l <= 64}
|
||||||
assert{l&(l-1) == 0}
|
assert{l&(l-1) == 0}
|
||||||
mask_of{l}
|
spaced_mask_of{l}
|
||||||
}
|
}
|
||||||
|
|
||||||
def unaligned_spaced_mask_mod{l:T} = {
|
def unaligned_spaced_mask_mod{l:T} = {
|
||||||
assert{l < 64}
|
assert{l < 64}
|
||||||
def m = mask_of{l}
|
def m = spaced_mask_of{l}
|
||||||
def d = cast_i{T, ctz{m}} # = 64%l
|
def d = cast_i{T, ctz{m}} # = 64%l
|
||||||
tup{m>>d | m<<(l-d), d}
|
tup{m>>d | m<<(l-d), d}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user