• 04/11/2022
  • Public Content

Building the Intel® Threading Building Blocks Version

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.
  1. Remove all of the files that were created when you build the serial version by running the following command:
    %make clean
  2. Open the source file
    in your favorite code editor.
  3. 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"
  4. Remove the comment marks from the
    function related to Intel® TBB implementation.
    • It calls the Intel® TBB
      function. This function is where the parallelization call happens. The first two arguments in this function define the iteration space the loop executes along from
      . The third parameter is a C++11 lambda expression that lets the compiler do the tedious work of creating a function object.
  5. Add comment marks to the
    serial parallel_thread()
    function call since Intel® TBB version of
    function replaces this function.
  6. 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.

Product and Performance Information


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