That would be awesome (I love ipython notebook).
On Tue, Aug 12, 2014 at 11:20 AM, Sturla Molden
wrote:
> Brett Calcott
> wrote:
>
> > For someone who has bumbled around trying to use prange & openmp on
> the mac
> > (but successfully used python threading), this sounds great. Is there an
> >
Brett Calcott
wrote:
> For someone who has bumbled around trying to use prange & openmp on the
> mac
> (but successfully used python threading), this sounds great. Is there an
> example of this somewhere that you can point us to?
No, but I could make one :)
ipython notebook?
Sturla
On Tue, Aug 12, 2014 at 10:26 AM, Sturla Molden
wrote:
> The sooner you discover you do not
> need Cython's prange, the less pain it will cause.
>
>
For someone who has bumbled around trying to use prange & openmp on the mac
(but successfully used python threading), this sounds great. Is there an
Cython does not do an error here:
- i is recognized as private
- r is recognized as reduction
- w is (correctly) recognized as shared
If you need thread local storage, use threading.local()
I agree that scoped cdefs would be an advantage.
Personally I prefer to avoid OpenMP and just use Python
The attached cython program uses an extension class to represent a unit of
work. The with parallel block temporarily gets the gil to allocate the object,
then release the gil and performs the task with a for i in prange(...)
statement. My expectation was to have w recognized as a thread private