1.. _Parallelizing_Simple_Loops:
2
3Parallelizing Simple Loops
4==========================
5
6
7The simplest form of scalable parallelism is a loop of iterations that
8can each run simultaneously without interfering with each other. The
9following sections demonstrate how to parallelize simple loops.
10
11
12.. note::
13   |full_name| components are
14   defined in namespace ``tbb``. For brevity’s sake, the namespace is
15   explicit in the first mention of a component, but implicit
16   afterwards.
17
18
19When compiling oneTBB programs, be sure to link in the oneTBB shared
20library, otherwise undefined references will occur. The following table
21shows compilation commands that use the debug version of the library.
22Remove the "``_debug``" portion to link against the production version
23of the library.
24
25
26.. container:: tablenoborder
27
28
29   .. list-table::
30      :header-rows: 1
31
32      * -  Operating System
33        -  Command line
34      * -     Windows\* OS
35        -      ``icl /MD example.cpp tbb_debug.lib``
36      * -     Linux\* OS
37        -      ``icc example.cpp -ltbb_debug``
38
39
40.. include:: Parallelizing_Simple_Loops_toctree.rst