15
$\begingroup$

This time I have a very short question.

Is there a deeper reason why ParallelMapThread does not exist?

Regards, Frink

$\endgroup$
14
$\begingroup$

May be because its easy to implement?

MapThread[f, {{a1, a2, a3}, {b1, b2, b3}}]

(* {f(a1,b1),f(a2,b2),f(a3,b3)} *)

ParallelMap[f @@ # &, {{a1, a2, a3}, {b1, b2, b3}} // Transpose]

(* {f(a1,b1),f(a2,b2),f(a3,b3)} *)

$\endgroup$
13
$\begingroup$

Many functional operations including MapThread can be easily parallelized by composing the function with ParallelSubmit, then collecting all concurrent jobs:

WaitAll[MapThread[ParallelSubmit @* f, {{a1, a2, a3}, {b1, b2, b3}}]]
$\endgroup$
  • 2
    $\begingroup$ Is there any chance to get this long-standing unpacking bug fixed? It was described more than 4 years ago and reported to support multiple times. $\endgroup$ – Szabolcs Oct 7 '16 at 9:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.