parent
b23a9794a4
commit
32310aecad
4 changed files with 23 additions and 0 deletions
|
|
@ -135,6 +135,9 @@ class _RHSValueCompiler(_ValueCompiler):
|
|||
val, = value.operands
|
||||
mask = (1 << len(val)) - 1
|
||||
return lambda state: normalize(arg(state) == mask, shape)
|
||||
if value.op == "r^":
|
||||
# Believe it or not, this is the fastest way to compute a sideways XOR in Python.
|
||||
return lambda state: normalize(str(arg(state)).count("1") % 2, shape)
|
||||
elif len(value.operands) == 2:
|
||||
lhs, rhs = map(self, value.operands)
|
||||
if value.op == "+":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue