To build the Intel® Threading Building Blocks (Intel® TBB) version, you will modify the sample application to use Intel® TBB and then compile the modified code. You will then run the application and then compare the time with the baseline performance time.
Remove all of the files that were created when you build the serial version by running the following command:
%make clean
Open the source file src/build_with_tbb/build_with_tbb.cpp in 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 the comment marks from the parallel_thread() function related to Intel® TBB implementation.
Add comment marks to the serial parallel_thread() function call since Intel® TBB version of parallel_for() function replaces this function.
Build the sample by running the following command:
%make tbb
The makefile automatically runs the sample after it is built.
Compare the time to render the image to the baseline performance time.