You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@pshashank8, sorry, I think I missed your comment somehow. If you're still interested, see the HackerGuide on how to write a test, then look at the existing prange tests in tests/memoryview/memslice.pyx.
Regarding the implementation, I think it might be enough to call .coerce_to_simple() on the non-trivial prange() arguments during type analysis. That should trigger their ahead-of-time evaluation into a temporary variable, if necessary.
The following construct crashes:
The generated C code is as follows:
len()
is evaluated after releasing the GIL. The loop bounds should be evaluated before, and the GIL check applied to all parts of the loop.Also, actually evaluating Python's
len()
after first converting the memory view to a Python object is stupid. Might also be part of the problem here.The text was updated successfully, but these errors were encountered: