Re: [Cython] Nested prange loops - (was: [cython-users] Converting to Python objects with nogil (inside prange for loop))

2022-07-18 Thread Lisandro Dalcin
On Fri, 15 Jul 2022 at 11:03, Stefan Behnel wrote: > nested prange loops seem to be a common gotcha for users. I can't say if > there is ever a reason to do this, but at least I can't think of any. Unless you make nested prange() emit the following C code: #pragma omp parallel for collapse(2)

[Cython] Nested prange loops - (was: [cython-users] Converting to Python objects with nogil (inside prange for loop))

2022-07-15 Thread Stefan Behnel
Hi, nested prange loops seem to be a common gotcha for users. I can't say if there is ever a reason to do this, but at least I can't think of any. For me, this sounds like we should turn it into a compile time error – unless someone can think of a use case? Even in that case, I'd still emit a

Re: [Cython] nested prange

2011-11-28 Thread mark florisson
Ok, great. Indeed, there is a bug in gcc 4.5, which is fixed I believe in 4.6. For the OpenMP backend that's not such a big issue, as it's likely not very useful anyway. On 26 November 2011 18:35, Robert Bradshaw wrote: > I'm all for allowing it at the Cython level even though we can't emit > co

Re: [Cython] nested prange

2011-11-26 Thread Robert Bradshaw
I'm all for allowing it at the Cython level even though we can't emit code for it at the C level (due to C compiler bugs, right?) - Robert On Fri, Nov 25, 2011 at 3:12 AM, mark florisson wrote: > I think we should allow nested prange()s, although it won't invoke > nested OpenMP parallelism now,

[Cython] nested prange

2011-11-25 Thread mark florisson
I think we should allow nested prange()s, although it won't invoke nested OpenMP parallelism now, it still specifies that iterations are independent which can be useful for optimizations now (e.g. collapsing two loops into one) and in the future with other backends. Any thoughts or objections?