Debug Versus Release Libraries

Threading Building Blocks includes dynamic shared libraries that come in debug and release versions, as described in Table 10-1.

Table 10-1. Dynamic shared libraries

Library

Description

When to use

tbb_debug tbbmalloc_debug

These versions have extensive internal checking for incorrect use of the library.

Use with code that is compiled with the TBB_DO_ASSERT macro set to 1.

tbb tbbmalloc

These versions deliver top performance.

Use with code compiled with TBB_DO_ASSERT undefined or set to 0.

All versions of the libraries support the Intel Thread Checker and Intel Thread Profiler. The debug versions always have full support enabled. The release version requires compiling code with the macro TBB_DO_THREADING_TOOLS set to 1 for full support.

Warning

The instrumentation support for the Intel Thread Checker becomes live after the first initialization of a task. If the library components are used before this initialization occurs, the Intel Thread Checker may falsely report race conditions that cannot actually occur.

Get Intel Threading Building Blocks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.