bit.shl (arity 3)ΒΆ
x[:n] <<= times
times is a constant.
@Assumes: times <= n
@Assumes: times <= n
SignatureΒΆ
def shl n, times, x { ... }
Defined in bit/shifts.fj β lines 40β43 (view on GitHub).
ComplexityΒΆ
Time:
n(2@-1)Space:
n(2@-1)
See the complexity glossary for what @, w, dw, dbit, n mean.
SourceΒΆ
Click to view the macro body
def shl n, times, x {
rep(n-times, i) .mov x+(n-1-i)*dw, x+(n-1-i-times)*dw
.zero times, x
}