Building the Intel® Threading Building Blocks Version
- Remove all of the files that were created when you build the serial version by running the following command:%make clean
- Open the source filesrc/build_with_tbb/build_with_tbb.cppin your favorite code editor.
- Remove the comment marks for the Intel® TBB headers to declare the Intel® TBB functions that will be used in the sample application.#include "tbb/tbb.h"
- Remove comment marks to theparallel_thread()function related to Intel® TBB implementation
- The Intel® TBBparallel_forfunction. This function is where the parallelization call happens. The first two arguments in this function define the iteration space the loop executes along fromstartytostopy. The third parameter is a C++11 lambda expression that lets the compiler do the tedious work of creating a function object.
- Add comment marks to theserial parallel_thread()function since the Intel® TBB version ofparallel_thread()replaces this function.
- Build the sample by running the following command:%make tbb