hex.ptr_wflipΒΆ
Effectively: wflip *ptr, value
ptr is a hex[:w/4] that holds an address, which we assume is w-aligned.
SignatureΒΆ
def ptr_wflip ptr, value { ... }
Defined in hex/pointers/xor_to_pointer.fj β lines 154β157 (view on GitHub).
ComplexityΒΆ
Time:
w(1.5@+5)Space:
w(1.5@+17)
See the complexity glossary for what @, w, dw, dbit, n mean.
SourceΒΆ
Click to view the macro body
def ptr_wflip ptr, value {
.pointers.set_flip_pointer ptr
rep(w, i) .pointers.advance_by_one_and_flip__ptr_wflip (#(i^((i+1)%w))), (value>>i)&1
}
Depends onΒΆ
Used byΒΆ
Example usesΒΆ
hex.ptr_wflip_2nd_wordinhex/pointers/xor_to_pointer.fj
β Previous: hex.pointers.xor_hex_to_flip_ptr/2
Next: hex.pointers.advance_by_one_and_flip__ptr_wflip β