[Cython] CEP: prange for parallel loops
Dag Sverre Seljebotn
d.s.seljebotn at astro.uio.no
Mon Apr 4 15:51:23 CEST 2011
On 04/04/2011 03:27 PM, Nathaniel Smith wrote:
> On Mon, Apr 4, 2011 at 3:17 AM, Dag Sverre Seljebotn
> <d.s.seljebotn at astro.uio.no> wrote:
>> * A simple and friendly solution that covers, perhaps, 80% of the cases,
>> based on simply replacing range with prange.
> This is a "merely" aesthetic objection, while remaining agnostic on
> the larger discussion, but -- 'for i in prange(...)' looks Just Wrong.
> This is not a regular loop over a funny range, it's a funny loop over
> a regular range. Surely it should be 'pfor i in range(...)'. Or better
> yet, spell it 'parallel_for'.
I don't mind calling it "parallel_for" myself, if only a good place to
provide scheduling parameters (numthreads, dynamic vs. static
scheduling, chunksize) can be found. That would make it more obvious
that scoping rules are different too.
No sense in discussing this further until the higher-level discussion on
whether to do it or not has completed though.
Dag Sverre
More information about the cython-devel
mailing list