stl.bit2hex (arity 3)ΒΆ
hex[:(n+3)/4] = bit[:n]
n is a size-constant, hex is a hex.vec (n+3)/4, bit is a bit.vec n.
SignatureΒΆ
def bit2hex n, hex, bit { ... }
Defined in casting.fj β lines 22β25 (view on GitHub).
ComplexityΒΆ
Time:
n(1.25@-1)Space:
n(1.25@+2)
See the complexity glossary for what @, w, dw, dbit, n mean.
SourceΒΆ
Click to view the macro body
def bit2hex n, hex, bit {
hex.zero (n+3)/4, hex
rep(n, i) bit.exact_xor hex+(i/4)*dw+dbit+(i%4), bit+i*dw
}
Depends onΒΆ
β Previous: stl.bit2hex/2
Next: stl.hex2bit/2 β