Tutorial

  • 03/26/2021
  • 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

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