Version Information

Intel® Threading Building Blocks (Intel® TBB) has macros, an environment variable, and a function that reveal version and run-time information.

Version Macros

The header tbb/tbb_stddef.h defines macros related to versioning, as described below. You should not redefine these macros.

Version Macros

Macro

Description of Value

TBB_INTERFACE_VERSION

Current interface version. The value is a decimal numeral of the form xyyy where x is the major version number and y is the minor version number.

TBB_INTERFACE_VERSION_MAJOR

TBB_INTERFACE_VERSION/1000; that is, the major version number.

TBB_COMPATIBLE_INTERFACE_VERSION

Oldest major interface version still supported.

TBB_VERSION Environment Variable

Set the environment variable TBB_VERSION to 1 to cause the library to print information on stderr. Each line is of the form “TBB: tag value, where tag and value are described below.

Output from TBB_VERSION

Tag

Description of Value

VERSION

Intel TBB product version number.

INTERFACE_VERSION

Value of macro TBB_INTERFACE_VERSION when library was compiled.

BUILD_...

Various information about the machine configuration on which the library was built.

TBB_USE_ASSERT

Setting of macro TBB_USE_ASSERT

DO_ITT_NOTIFY

1 if library can enable instrumentation for Intel® Parallel Studio XE and Intel® Threading Tools; 0 or undefined otherwise.

ITT

yes if library has enabled instrumentation for Intel® Parallel Studio XE and Intel® Threadng Tools, no otherwise. Typically yes only if the program is running under control of Intel® Parallel Studio XE or Intel® Threadng Tools.

ALLOCATOR

Underlying allocator for tbb::tbb_allocator. It is scalable_malloc if the Intel® TBB malloc library was successfully loaded; malloc otherwise.

CAUTION

This output is implementation specific and may change at any time.

TBB_runtime_interface_version Function

Summary

Function that returns the interface version of the Intel® TBB library that was loaded at runtime.

Syntax

extern “C” int TBB_runtime_interface_version();

Header

#include "tbb/tbb_stddef.h"

Description

The value returned by TBB_runtime_interface_version() may differ from the value of TBB_INTERFACE_VERSION obtained at compile time. This can be used to identify whether an application was compiled against a compatible version of the Intel® TBB headers.

In general, the run-time value TBB_runtime_interface_version() must be greater than or equal to the compile-time value of TBB_INTERFACE_VERSION. Otherwise the application may fail to resolve all symbols at run time.

Pour de plus amples informations sur les optimisations de compilation, consultez notre Avertissement concernant les optimisations.