Hello Ed,

I'm not really quite sure, to be honest. I learned parallel programming on
MPI clusters and GPUs, in which you write a very large chunk of code and
need to impose barrier synchronization. My understanding is that
PDL::ParallelCPU parallelizes on individual PDL function calls, so five PDL
method calls could go from single-threaded to multi-threaded and back five
times. In contrast, PDL::Parallel::threads::SIMD parallelizes whole Perl
code blocks, with support for barrier synchronization to make sure no
threads get too far ahead of others. Thus you go from single threaded to
multithreaded and back only once. Also, your Perl code is run in parallel,
not just the PDL method (implemented in C).

Hard to say much more than that. I never actually used
PDL::Parallel::threads. I was merely familiar with SIMD programming and
thought it would be fun to make it possible with PDL on a single computer.

David



On Sun, Feb 13, 2022 at 12:39 AM Ed . <ej...@hotmail.com> wrote:

> Great!
>
>
>
> I had a look at the ::SIMD module, and was wondering (since I’m still
> quite new to parallel stuff) when you would use that rather than the
> PDL::ParallelCPU (no ā€œ::ā€ in it, btw) stuff?
>
>
>
> Best regards,
>
> Ed
>
>
>
> *From: *David Mertens <dcmertens.p...@gmail.com>
> *Sent: *13 February 2022 05:37
> *To: *pdl-devel <pdl-devel@lists.sourceforge.net>
> *Subject: *[Pdl-devel] PDL::Parallel::threads has been updated
>
>
>
> Hello everyone,
>
>
>
> I have finally brought PDL::Parallel::threads into this decade. Actually I
> didn't change any of the interface. They are all minor updates to get
> things to compile and tests to run properly.
>
>
>
> Enjoy!
>
> 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
>
>
>


-- 
 "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
_______________________________________________
pdl-devel mailing list
pdl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-devel

Reply via email to