Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[oneTBB] Add specification version macro #592

Merged
merged 3 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.. SPDX-FileCopyrightText: 2019-2021 Intel Corporation
.. SPDX-FileCopyrightText: Contributors to the oneAPI Specification project.
..
.. SPDX-License-Identifier: CC-BY-4.0

Expand All @@ -14,6 +15,8 @@ version and runtime information.

// Defined in header <oneapi/tbb/version.h>

#define ONETBB_SPEC_VERSION /*implementation-defined*/

#define TBB_VERSION_MAJOR /*implementation-defined*/
#define TBB_VERSION_MINOR /*implementation-defined*/
#define TBB_VERSION_STRING /*implementation-defined*/
Expand All @@ -25,16 +28,21 @@ version and runtime information.
const char* TBB_runtime_version();
int TBB_runtime_interface_version();

**Version Macros**
Version Macros
--------------

oneTBB defines macros related to versioning, as described below.

* ``ONETBB_SPEC_VERSION`` macro defined to the decimal literal whose value equals to
``x * 100 + y``, where ``x`` is the major version and ``y`` is the minor version
of the latest specification of oneTBB fully supported by the implementation.
* ``TBB_VERSION_MAJOR`` macro defined to integral value that represents major library version.
* ``TBB_VERSION_MINOR`` macro defined to integral value that represents minor library version.
* ``TBB_VERSION_STRING`` macro defined to the string representation of the full library version.
* ``TBB_INTERFACE_VERSION`` macro defined to current interface version. The value is a decimal
numeral of the form ``xyyz`` where ``x`` is the major interface version number and ``y`` is the
minor interface version number. This macro is increased in each release.
* ``TBB_INTERFACE_VERSION`` macro defined to a decimal literal for the current interface version.
The value of the literal equals to ``x * 1000 + y * 10 + z`` where ``x`` is the major interface
version number, ``y`` is the minor interface version number, and ``z`` is a decimal digit.
This macro is increased in each release.
* ``TBB_INTERFACE_VERSION_MAJOR`` macro defined to ``TBB_INTERFACE_VERSION/1000``, which is the
major interface version number.
* ``TBB_INTERFACE_VERSION_MINOR`` macro defined to ``TBB_INTERFACE_VERSION%1000/10``, which is the
Expand Down
4 changes: 4 additions & 0 deletions source/elements/oneTBB/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
.. SPDX-FileCopyrightText: 2019-2021 Intel Corporation
.. SPDX-FileCopyrightText: Contributors to the oneAPI Specification project.
..
.. SPDX-License-Identifier: CC-BY-4.0

==============================================
oneAPI Threading Building Blocks Specification
==============================================
**[spec.version]**

**Version**: |tbb_version|.

.. toctree::
:maxdepth: 2
Expand Down
4 changes: 4 additions & 0 deletions source/elements/oneTBB/source/nested-index.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.. SPDX-FileCopyrightText: 2019-2021 Intel Corporation
.. SPDX-FileCopyrightText: Contributors to the oneAPI Specification project.
..
.. SPDX-License-Identifier: CC-BY-4.0

Expand All @@ -7,6 +8,9 @@
======
oneTBB
======
**[spec.version]**

This is the specification of |tbb_full_name|, part of the oneAPI Specification version |tbb_version|.

.. toctree::
:maxdepth: 2
Expand Down