# 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.

### Note

Intel® Threading Building Blocks (Intel® TBB) components are defined in namespace `tbb`. For brevity’s sake, the namespace is explicit in the first mention of a component, but implicit afterwards.

When compiling Intel® TBB programs, be sure to link in the Intel® TBB shared library, otherwise undefined references will occur. The following table shows compilation commands that use the debug version of the library. Remove the "`_debug`" portion to link against the production version of the library. See `doc/Getting_Started.pdf` for other command line possibilities.

Sample command lines for simple debug builds
Operating System | Command line
--- | ---
Windows* OS | `icl /MD example.cpp tbb_debug.lib`
Linux* OS | `icc example.cpp -ltbb_debug`
OS* X Systems | `icc example.cpp -ltbb_debug`

Parent topic: Intel® Threading Building Blocks (Intel® TBB) User Guide

- Initializing and Terminating the Library
- parallel_for
- parallel_reduce
- Advanced Example
- Advanced Topic: Other Kinds of Iteration Spaces

## See Also

Debug Versus Release Libraries
Which Dynamic Libraries to Use