Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Systems Interfaces & Deployment > Parallel Computing > Data Parallelism >
Mathematica > Core Language > Tuning & Debugging > Parallel Computing > Data Parallelism >

ParallelMap

ParallelMap[f, expr]
applies f in parallel to each element on the first level in expr.
ParallelMap[f, expr, levelspec]
applies f in parallel to parts of expr specified by levelspec.
  • ParallelMap is a parallel version of Map, which automatically distributes different applications of f among different kernels and processors.
  • ParallelMap will give the same results as Map, except for side effects during the computation.
  • ParallelMap uses the same level specifications as Map. Not all level specifications can be parallelized.
  • If an instance of ParallelMap cannot be parallelized it is evaluated using Map.
Use explicit pure functions:
Functions used need to be distributed first:
If a level specification prevents parallization, ParallelMap evaluates like Map:
New in 7
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team