Four macros control certain debugging features. In general, it is useful to compile with these features on for development code, and off for production code, because the features may decrease performance. The table below summarizes the macros and their default values. A value of 1 enables the corresponding feature; a value of 0 disables the feature.
Macro |
Default Value |
Feature |
---|---|---|
TBB_USE_DEBUG |
Windows* OS: 1 if _DEBUG is defined, 0 otherwise. |
Default value for all other macros in this table. |
All other systems: 0. |
||
TBB_USE_ASSERT |
TBB_USE_DEBUG
|
Enable internal assertion checking. Can significantly slow performance. |
TBB_USE_THREADING_TOOLS |
Enable full support for Intel® Parallel Studio XE and Intel® Threading Tools. |
|
TBB_USE_PERFORMANCE_WARNINGS |
Enable warnings about performance issues. |
The macro TBB_USE_ASSERT controls whether error checking is enabled in the header files. Define TBB_USE_ASSERT as 1 to enable error checking.
If an error is detected, the library prints an error message on stderr and calls the standard C routine abort. To stop a program when internal error checking detects a failure, place a breakpoint on tbb::assertion_failure.
On Microsoft Windows* operating systems, debug builds implicitly set TBB_USE_ASSERT to 1 by default
The macro TBB_USE_THREADING_TOOLS controls support for Intel® Threading Tools:
Intel® Inspector XE
Intel® VTune™ Amplifier XE
Intel® Parallel Inspector
Intel® Parallel Amplifier
Intel® Thread Profiler
Intel® Thread Checker
Define TBB_USE_THREADING_TOOLS as 1 to enable full support for these tools.
That is full support is enabled if error checking is enabled. Leave TBB_USE_THREADING_TOOLS undefined or zero to enable top performance in release builds, at the expense of turning off some support for tools.
The macro TBB_USE_PERFORMANCE_WARNINGS controls performance warnings. Define it to be 1 to enable the warnings. Currently, the warnings affected are:
Some that report poor hash functions for concurrent_hash_map. Enabling the warnings may impact performance.
Misaligned 8-byte atomic stores on Intel® IA-32 processors.