Tutorial

  • 12/16/2019
  • Public Content

Introduction to Threading Your Application

This tutorial uses the Tachyon sample application. Tachyon is a ray-tracer application, rendering objects described in data files. The application uses
balls.dat
as the input file. The data files are stored in the
\tachyon\dat\
directory.
Originally, Tachyon was an application with parallelism implemented in function
pthread_create()
with explicit threads: one for the rendering, and the other for calculations. You can find the original implementation in the source file
pthread.cpp
available in the
src
directory Linux* samples package.
In this tutorial, we implement parallelization on the calculation thread with OpenMP* and Intel® Threading Building Blocks (Intel® TBB). Parallelization is implemented only for the
draw_task()
function, which you can find in the source file
build_serial.cpp
.
In this tutorial, you will build different parallel implementations of the same function with the Intel compiler. The sample application displays the execution time required to render the object in the window title. This time is an indication of the speedup obtained with parallel implementations compared to a baseline established with a serial implementation in the first step.
This tutorial is available in Linux*, macOS*, and Windows* versions.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804