cython/cython

Generalise parallel loops - piter()

Open

#2,628 opened on Sep 25, 2018

View on GitHub
 (0 comments) (0 reactions) (0 assignees)Python (8,663 stars) (1,517 forks)batch import
Cython Language Featurefeaturehelp wanted

Description

Cython currently restricts OpenMP loops to integer iteration using cython.parallel.prange().

A more general cython.parallel.piter() to wrap iterables would allow extending this to C++ iteration, C arrays, bytes/unicode buffers and direct memory view iteration. Except for C++ iteration (which the C++ compiler can handle), all of these cases are mapped to integer iteration internally and would thus be converted to a normal prange() loop by Cython.

Contributor guide