hex.shl_hex (arity 3)ΒΆ
dst[:n] <<= 4*times
@Assumes: times <= n
@Assumes: times <= n
SignatureΒΆ
def shl_hex n, times, dst @ end { ... }
Defined in hex/shifts.fj β lines 34β39 (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 shl_hex n, times, dst @ end {
stl.comp_if0 times, end
.zero times, dst+(n-times)*dw
rep(n-times, i) .xor_zero dst+(n-1-i)*dw, dst+(n-1-times-i)*dw
end:
}
Depends onΒΆ
Used byΒΆ
Example usesΒΆ
hex.shl_hexinhex/shifts.fj
β Previous: hex.shl_hex/2
Next: hex.shr_hex/2 β