hex.shr_hex (arity 3)ΒΆ
dst[:n] >>= 4*times
@Assumes: times <= n
@Assumes: times <= n
SignatureΒΆ
def shr_hex n, times, dst @ end { ... }
Defined in hex/shifts.fj β lines 53β58 (view on GitHub).
ComplexityΒΆ
Time:
n(@+4)Space:
n(@+28)
See the complexity glossary for what @, w, dw, dbit, n mean.
SourceΒΆ
Click to view the macro body
def shr_hex n, times, dst @ end {
stl.comp_if0 times, end
.zero times, dst
rep(n-times, i) .xor_zero dst+i*dw, dst+(i+times)*dw
end:
}
Depends onΒΆ
Used byΒΆ
Example usesΒΆ
hex.shr_hexinhex/shifts.fj
β Previous: hex.shr_hex/2
Next: hex.shifts.shl_bit_once β