[Cython] CEP: prange for parallel loops
Pauli Virtanen
pav at iki.fi
Tue Apr 5 15:10:55 CEST 2011
Tue, 05 Apr 2011 12:55:36 +0000, Pauli Virtanen wrote:
[clip]
> # Assignment to non-private variables causes a compile-time
> # error; this avoids common mistakes, such as forgetting to
> # declare the reduction variable.
> alpha += 42
> alpha123 = 9
> ptr = 94
Actually, I'm not sure this is absolutely necessary -- life is tough,
especially if you are programming in parallel, and there are limits to
hand-holding.
However, an explicit declaration could be added for turning the error off
for the (rare) cases where this makes sense (e.g. setting a shared flag)
cdef cython.parallel.shared[double] some_flag
--
Pauli Virtanen
More information about the cython-devel
mailing list