r += p
u >>= 1
r >>= 1
- continue # loop again
+ continue # loop again
# implementations could use count-zeros on
# both v and s to save cycles
if v & 1 == 0:
s += p
v >>= 1
s >>= 1
- continue # loop again
+ continue # loop again
# both LSB of u and v are 1
x = u - v
if x > 0:
@plain_data(frozen=True, eq=False)
class CLDivRemState:
__slots__ = "shape", "name", "clock", "substep", "d", "r", "q", "shift"
+
def __init__(self, shape, *, name=None, src_loc_at=0):
assert isinstance(shape, CLDivRemShape)
if name is None: