Dag Sverre Seljebotn wrote: > Hmm... yes. Care would need to be taken though because Cython might in > the future very well generate a "while" loop instead for such a > statement under some circumstances, and that won't work with OpenMP. One > should be careful with assuming what the C result will be of Cython > code. That's why I proposed using an alternative construct which both > does the OpenMP stuff and contains the for loop.
As a matter of fact, the next Cython release might prepend all for-in-range-loops with an if-test under some circumstances, in order to better match Python looping semantics (if the loop isn't executed, the loop counter should never be written to -- in contrast with C). So this is already happening. OpenMP might need different loop semantics and so calls for a different construct. -- Dag Sverre _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion