in reply to OpenMP from Perl?
Looking around, the only references I found for Perl & OpenMP are those relating to Perl's use in running the OpenMP test and validation suite--so the answer to your first question appears to be: No.
Could there be a Perl implementation the OpenMP API?
I'm talking at the Perl level, rather than within the compiler which I think is a non-starter.
On the basis of the examples I've seen, there would be little problem hand coding the types of constructs used.
Making these turn-on and offable (with apologies to EE), via say, the inclusion of a module is probably possible.
The module could use a source filter to expand/enact comment-embedded directives. Comment out the use statement, you have a single-threaded program. Uncomment the use statement and it becomes parallel.
Smart::Comments works in a similar way.
It would depend upon what you were using it for, but my gut feel is no.
On the basis that all of the examples of using OpenMP I found, were for cpu intensive math. Usually on large, repetative data structures. And whilst Perl is fine for the odd bit of math here and there and can certainly handle the large data structures, it is never going to be good at performing intensively repetative math. Natively that is.
However, PDL is great at performing this kind of thing, and the speed ups obtained from switching to using piddles rather than Perl arrays for this type of work will far exceed any benefits that you could derive from threading Perl native math.
On the basis that piddles are opaque black boxes at the Perl level, I would have to say I think not. Hopefully, lin0 will breeze by and give an answer with more authority on that than I can. Ie, Some authority.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: OpenMP from Perl?
by lin0 (Curate) on Jun 22, 2007 at 06:35 UTC | |
by BrowserUk (Patriarch) on Jun 22, 2007 at 08:10 UTC | |
by lin0 (Curate) on Jun 22, 2007 at 13:33 UTC |