> On Dec 25, 2009, at 11:37 AM, Dag Sverre Seljebotn wrote: > >> Michael G wrote: >>> Hello, >>> >>> I was wondering if there has been any consensus regarding the openMP >>> implementation (see http://wiki.cython.org/enhancements/parallel). I >>> would put my vote for proposal 6 or 7 simply because they seem to >>> allow for the most control over shared/private variables and the >>> scheduler openMP is using. On the other-hand, the comments based >>> implementations would be very easy to code! >>> >>> So the question is: what are people doing right now to implement >>> openMP in their code? >> >> Not using Cython. All the OpenMP I have heard of has been using C >> and just >> wrapping the code in Cython. Doing so would be a terrible experience. >> >> If you want to help make this happen let us know. As far as I know, >> none >> of the existing Cython developers have any personal interest in >> OpenMP for >> their own projects. >> >> BTW, my vote is for a more or less direct mapping of OpenMP into the >> Cython language first time around (through e.g. magic functions in a >> magic >> cython.openmp namespace). There's loads of features which can't be >> mapped >> directly to a single for-loop. Then, once one has some experience >> using >> OpenMP and Cython together and common patterns emerges, one can look >> into >> http://wiki.cython.org/enhancements/parallel. > > +1 > > OpenMP could probably be supported directly from Cython with a cdef > extern block and a special cython.cpragma("any string") that gets spit > out right to the C source.
With OpenMP one needs to list which function-local variables are thread-local and which are global, so at the very least Cython's variable name mangling must be coupled with OpenMP directives somehow. Dag Sverre _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
