Author: Richard Plangger <r...@pasra.at>
Branch: vecopt-merge
Changeset: r79005:299b91377f5f
Date: 2015-08-17 10:40 +0200
http://bitbucket.org/pypy/pypy/changeset/299b91377f5f/

Log:    added some comments to the state switching

diff --git a/pypy/module/micronumpy/loop.py b/pypy/module/micronumpy/loop.py
--- a/pypy/module/micronumpy/loop.py
+++ b/pypy/module/micronumpy/loop.py
@@ -58,7 +58,7 @@
         if right_out_equal:
             return call2_advance_out_left
         else:
-            # left is a scalar, and right and out do not match
+            # worst case, nothing can be shared and lhs is a scalar
             return call2_advance_out_left_right
     else:
         # lhs is NOT a scalar
@@ -71,14 +71,17 @@
                 return call2_advance_out_right
         else:
             if right_out_equal:
+                # right and out are equal, only advance left and out
                 return call2_advance_out_left
             else:
                 if right_iter and right_state.same(left_state):
+                    # left and right are equal, but still need to advance out
                     return call2_advance_out_left_eq_right
                 else:
+                    # worst case, nothing can be shared
                     return call2_advance_out_left_right
 
-    assert 0, "logical problem with the selection of the call 2 case"
+    assert 0, "logical problem with the selection of the call2 case"
 
 def generate_call2_cases(name, left_state, right_state):
     call2_driver = jit.JitDriver(name='numpy_call2_' + name,
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to