cython/cython

Generalise parallel loops - piter()

Open

#2,628 opened on Sep 25, 2018

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

Repository metrics

Stars
 (8,663 stars)
PR merge metrics
 (Avg merge 45d 12h) (52 merged PRs in 30d)

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