Loop Parallelization
The simplest form of scalable parallelism is a loop of iterations that can each run simultaneously without interfering with each other. The following sections demonstrate how to parallelize such simple loops.
-
parallel_for
andparallel_reduce
Load-balanced, parallel execution of a fixed number of independent loop iterations
-
parallel_scan
A template function that computes a parallel prefix (
y[i] = y[i-1]
op
x[i]
)
Get Intel Threading Building Blocks now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.