Skip to content

Commit 761f604

Browse files
authored
[oneTBB] Add specification version macro (#592)
1 parent 192af07 commit 761f604

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

source/elements/oneTBB/source/configuration/version_information.rst

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.. SPDX-FileCopyrightText: 2019-2021 Intel Corporation
2+
.. SPDX-FileCopyrightText: Contributors to the oneAPI Specification project.
23
..
34
.. SPDX-License-Identifier: CC-BY-4.0
45
@@ -14,6 +15,8 @@ version and runtime information.
1415
1516
// Defined in header <oneapi/tbb/version.h>
1617
18+
#define ONETBB_SPEC_VERSION /*implementation-defined*/
19+
1720
#define TBB_VERSION_MAJOR /*implementation-defined*/
1821
#define TBB_VERSION_MINOR /*implementation-defined*/
1922
#define TBB_VERSION_STRING /*implementation-defined*/
@@ -25,16 +28,21 @@ version and runtime information.
2528
const char* TBB_runtime_version();
2629
int TBB_runtime_interface_version();
2730
28-
**Version Macros**
31+
Version Macros
32+
--------------
2933

3034
oneTBB defines macros related to versioning, as described below.
3135

36+
* ``ONETBB_SPEC_VERSION`` macro defined to the decimal literal whose value equals to
37+
``x * 100 + y``, where ``x`` is the major version and ``y`` is the minor version
38+
of the latest specification of oneTBB fully supported by the implementation.
3239
* ``TBB_VERSION_MAJOR`` macro defined to integral value that represents major library version.
3340
* ``TBB_VERSION_MINOR`` macro defined to integral value that represents minor library version.
3441
* ``TBB_VERSION_STRING`` macro defined to the string representation of the full library version.
35-
* ``TBB_INTERFACE_VERSION`` macro defined to current interface version. The value is a decimal
36-
numeral of the form ``xyyz`` where ``x`` is the major interface version number and ``y`` is the
37-
minor interface version number. This macro is increased in each release.
42+
* ``TBB_INTERFACE_VERSION`` macro defined to a decimal literal for the current interface version.
43+
The value of the literal equals to ``x * 1000 + y * 10 + z`` where ``x`` is the major interface
44+
version number, ``y`` is the minor interface version number, and ``z`` is a decimal digit.
45+
This macro is increased in each release.
3846
* ``TBB_INTERFACE_VERSION_MAJOR`` macro defined to ``TBB_INTERFACE_VERSION/1000``, which is the
3947
major interface version number.
4048
* ``TBB_INTERFACE_VERSION_MINOR`` macro defined to ``TBB_INTERFACE_VERSION%1000/10``, which is the

source/elements/oneTBB/source/index.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
.. SPDX-FileCopyrightText: 2019-2021 Intel Corporation
2+
.. SPDX-FileCopyrightText: Contributors to the oneAPI Specification project.
23
..
34
.. SPDX-License-Identifier: CC-BY-4.0
45
56
==============================================
67
oneAPI Threading Building Blocks Specification
78
==============================================
9+
**[spec.version]**
10+
11+
**Version**: |tbb_version|.
812

913
.. toctree::
1014
:maxdepth: 2

source/elements/oneTBB/source/nested-index.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.. SPDX-FileCopyrightText: 2019-2021 Intel Corporation
2+
.. SPDX-FileCopyrightText: Contributors to the oneAPI Specification project.
23
..
34
.. SPDX-License-Identifier: CC-BY-4.0
45
@@ -7,6 +8,9 @@
78
======
89
oneTBB
910
======
11+
**[spec.version]**
12+
13+
This is the specification of |tbb_full_name|, part of the oneAPI Specification version |tbb_version|.
1014

1115
.. toctree::
1216
:maxdepth: 2

0 commit comments

Comments
 (0)