oneTBB has macros, an environment variable, and a function that reveal version and runtime information.
// Defined in header <oneapi/tbb/version.h> #define TBB_VERSION_MAJOR /*implementation-defined*/ #define TBB_VERSION_MINOR /*implementation-defined*/ #define TBB_VERSION_STRING /*implementation-defined*/ #define TBB_INTERFACE_VERSION_MAJOR /*implementation-defined*/ #define TBB_INTERFACE_VERSION_MINOR /*implementation-defined*/ #define TBB_INTERFACE_VERSION /*implementation-defined*/ const char* TBB_runtime_version(); int TBB_runtime_interface_version();
oneTBB defines macros related to versioning, as described below.
TBB_VERSION_MAJORmacro defined to integral value that represents major library version.
TBB_VERSION_MINORmacro defined to integral value that represents minor library version.
TBB_VERSION_STRINGmacro defined to the string representation of the full library version.
TBB_INTERFACE_VERSIONmacro defined to current interface version. The value is a decimal numeral of the form
xis the major interface version number and
yis the minor interface version number. This macro is increased in each release.
TBB_INTERFACE_VERSION_MAJORmacro defined to
TBB_INTERFACE_VERSION/1000, which is the major interface version number.
TBB_INTERFACE_VERSION_MINORmacro defined to
TBB_INTERFACE_VERSION%1000/10, which is the minor interface version number.
Function that returns the interface version of the oneTBB library that was loaded at runtime.
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 oneTBB 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.
Function that returns the version string of the oneTBB library that was loaded at runtime.
The value returned by
TBB_runtime_version() may differ from the value of
TBB_VERSION_STRING obtained at compile time.
TBB_VERSION Environment Variable#
Set the environment variable
1 to cause the library to print information on
stderr. Each line is of the form
“TBB: tag value”, where tag and value provide additional
library information below.
This output is implementation specific and may change at any time.