• 2021.6
  • 04/11/2022
  • Public Content

Parallelizing Simple Loops

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 simple loops.
oneAPI Threading Building Blocks (oneTBB) components are defined in namespace
. For brevity’s sake, the namespace is explicit in the first mention of a component, but implicit afterwards.
When compiling oneTBB programs, be sure to link in the oneTBB shared library, otherwise undefined references will occur. The following table shows compilation commands that use the debug version of the library. Remove the “
” portion to link against the production version of the library.

Product and Performance Information


Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.