ParallelCombine

ParallelCombine[f, h[e1, e2, ...], comb]
evaluates in parallel by distributing parts of the computation to all parallel kernels and combining the partial results with comb.

ParallelCombine[f, h[e1, e2, ...]]
is equivalent to ParallelCombine[f, h[e1, e2, ...], h] if h has attribute Flat, and ParallelCombine[f, h[e1, e2, ...], Join] otherwise.

Details and OptionsDetails and Options

ExamplesExamplesopen allclose all

Basic Examples (2)Basic Examples (2)

Apply f in parallel to chunks of a list (with 4 parallel kernels available):

In[1]:=
Click for copyable input
Out[1]=

Show where each computation takes place:

In[2]:=
Click for copyable input
Out[2]=

By default Join is used as a combiner function:

In[1]:=
Click for copyable input
Out[1]=

Do a parallel filtering operation:

In[2]:=
Click for copyable input
Out[2]=
New in 7 | Last modified in 8
New to Mathematica? Find your learning path »
Have a question? Ask support »