1 | /* |
2 | Copyright (c) 2005-2021 Intel Corporation |
3 | |
4 | Licensed under the Apache License, Version 2.0 (the "License"); |
5 | you may not use this file except in compliance with the License. |
6 | You may obtain a copy of the License at |
7 | |
8 | http://www.apache.org/licenses/LICENSE-2.0 |
9 | |
10 | Unless required by applicable law or agreed to in writing, software |
11 | distributed under the License is distributed on an "AS IS" BASIS, |
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | See the License for the specific language governing permissions and |
14 | limitations under the License. |
15 | */ |
16 | |
17 | #ifndef __TBB_version_H |
18 | #define __TBB_version_H |
19 | |
20 | #include "detail/_config.h" |
21 | #include "detail/_namespace_injection.h" |
22 | |
23 | // Product version |
24 | #define TBB_VERSION_MAJOR 2021 |
25 | // Update version |
26 | #define TBB_VERSION_MINOR 5 |
27 | // "Patch" version for custom releases |
28 | #define TBB_VERSION_PATCH 0 |
29 | // Suffix string |
30 | #define __TBB_VERSION_SUFFIX "" |
31 | // Full official version string |
32 | #define TBB_VERSION_STRING __TBB_STRING(TBB_VERSION_MAJOR) "." __TBB_STRING(TBB_VERSION_MINOR) __TBB_VERSION_SUFFIX |
33 | |
34 | // OneAPI oneTBB specification version |
35 | #define ONETBB_SPEC_VERSION "1.0" |
36 | // Full interface version |
37 | #define TBB_INTERFACE_VERSION 12050 |
38 | // Major interface version |
39 | #define TBB_INTERFACE_VERSION_MAJOR (TBB_INTERFACE_VERSION/1000) |
40 | // Minor interface version |
41 | #define TBB_INTERFACE_VERSION_MINOR (TBB_INTERFACE_VERSION%1000/10) |
42 | |
43 | // The binary compatibility version |
44 | // To be used in SONAME, manifests, etc. |
45 | #define __TBB_BINARY_VERSION 12 |
46 | |
47 | //! TBB_VERSION support |
48 | #ifndef ENDL |
49 | #define ENDL "\n" |
50 | #endif |
51 | |
52 | //TBB_REVAMP_TODO: consider enabling version_string.ver generation |
53 | //TBB_REVAMP_TODO: #include "version_string.ver" |
54 | |
55 | #define __TBB_ONETBB_SPEC_VERSION(N) #N ": SPECIFICATION VERSION\t" ONETBB_SPEC_VERSION ENDL |
56 | #define __TBB_VERSION_NUMBER(N) #N ": VERSION\t\t" TBB_VERSION_STRING ENDL |
57 | #define __TBB_INTERFACE_VERSION_NUMBER(N) #N ": INTERFACE VERSION\t" __TBB_STRING(TBB_INTERFACE_VERSION) ENDL |
58 | |
59 | #ifndef TBB_USE_DEBUG |
60 | #define __TBB_VERSION_USE_DEBUG(N) #N ": TBB_USE_DEBUG\tundefined" ENDL |
61 | #elif TBB_USE_DEBUG==0 |
62 | #define __TBB_VERSION_USE_DEBUG(N) #N ": TBB_USE_DEBUG\t0" ENDL |
63 | #elif TBB_USE_DEBUG==1 |
64 | #define __TBB_VERSION_USE_DEBUG(N) #N ": TBB_USE_DEBUG\t1" ENDL |
65 | #elif TBB_USE_DEBUG==2 |
66 | #define __TBB_VERSION_USE_DEBUG(N) #N ": TBB_USE_DEBUG\t2" ENDL |
67 | #else |
68 | #error Unexpected value for TBB_USE_DEBUG |
69 | #endif |
70 | |
71 | #ifndef TBB_USE_ASSERT |
72 | #define __TBB_VERSION_USE_ASSERT(N) #N ": TBB_USE_ASSERT\tundefined" ENDL |
73 | #elif TBB_USE_ASSERT==0 |
74 | #define __TBB_VERSION_USE_ASSERT(N) #N ": TBB_USE_ASSERT\t0" ENDL |
75 | #elif TBB_USE_ASSERT==1 |
76 | #define __TBB_VERSION_USE_ASSERT(N) #N ": TBB_USE_ASSERT\t1" ENDL |
77 | #elif TBB_USE_ASSERT==2 |
78 | #define __TBB_VERSION_USE_ASSERT(N) #N ": TBB_USE_ASSERT\t2" ENDL |
79 | #else |
80 | #error Unexpected value for TBB_USE_ASSERT |
81 | #endif |
82 | |
83 | #define TBB_VERSION_STRINGS_P(N) \ |
84 | __TBB_ONETBB_SPEC_VERSION(N) \ |
85 | __TBB_VERSION_NUMBER(N) \ |
86 | __TBB_INTERFACE_VERSION_NUMBER(N) \ |
87 | __TBB_VERSION_USE_DEBUG(N) \ |
88 | __TBB_VERSION_USE_ASSERT(N) |
89 | |
90 | #define TBB_VERSION_STRINGS TBB_VERSION_STRINGS_P(oneTBB) |
91 | #define TBBMALLOC_VERSION_STRINGS TBB_VERSION_STRINGS_P(TBBmalloc) |
92 | |
93 | //! The function returns the version string for the Intel(R) oneAPI Threading Building Blocks (oneTBB) |
94 | //! shared library being used. |
95 | /** |
96 | * The returned pointer is an address of a string in the shared library. |
97 | * It can be different than the TBB_VERSION_STRING obtained at compile time. |
98 | */ |
99 | extern "C" TBB_EXPORT const char* __TBB_EXPORTED_FUNC TBB_runtime_version(); |
100 | |
101 | //! The function returns the interface version of the oneTBB shared library being used. |
102 | /** |
103 | * The returned version is determined at runtime, not at compile/link time. |
104 | * It can be different than the value of TBB_INTERFACE_VERSION obtained at compile time. |
105 | */ |
106 | extern "C" TBB_EXPORT int __TBB_EXPORTED_FUNC TBB_runtime_interface_version(); |
107 | |
108 | #endif // __TBB_version_H |
109 | |