Hello everybody -

PDL folks will know that I have a lot of projects running lately, but I
felt compelled to push this one through at the moment. Threads folks are
probably aware that I've been working on something lately and I now have
something that is hopefully worthy of your close scrutiny. I would
appreciate any feedback for the two modules listed in the subject line,
both of which shall be distributed on CPAN under PDL::Parallel::threads.

PDL::Parallel::threads provides a means for sharing PDL data across Perl
threads. Presently, it is not safe to launch multiple threads in Perl after
loading PDL. (A simple CLONE_SKIP fixes this, as implemented.) It makes
sharing of physical piddles and memory mapped files easy. I have hit some
bumps with memory mapping on Windows, but I expect that'll get ironed out
in the coming weeks and months. I can provide more feedback there if it
would be helpful.

PDL::Parallel::threads::SIMD provides a very simple interface (not
stress-tested) for launching groups of parallel processes with the
capability of performing barrier synchronization. This could almost serve
as a stand-alone Threads module, but I tend to affiliate SIMD stuff with
numerical computing, plus I use it in one or two of my tests. Perhaps when
PDL::Parallel::threads gets pulled into PDL, I can spin off ...::SIMD into
Threads::SIMD or some such.

I just uploaded the distribution to PAUSE, so expect it to hit CPAN in the
next 12-24 hours. You can examine the code on github:
https://github.com/run4flat/PDL-Parallel-threads

Thoughts and comments are welcome. PDL folks, I'd like to eventually move
this stuff into PDL's core, so the more feedback I can get on it, the
better.

Thanks!
David

-- 
 "Debugging is twice as hard as writing the code in the first place.
  Therefore, if you write the code as cleverly as possible, you are,
  by definition, not smart enough to debug it." -- Brian Kernighan

Reply via email to