Skip to content

Commit 2e2fe45

Browse files
committed
Add version info to the API definition
1 parent d26a36d commit 2e2fe45

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

offload/new-api/API/Common.td

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
def : Macro {
2+
let name = "OFFLOAD_VERSION_MAJOR";
3+
let desc = "Major version of the Offload API";
4+
let value = "0";
5+
}
6+
7+
def : Macro {
8+
let name = "OFFLOAD_VERSION_MINOR";
9+
let desc = "Minor version of the Offload API";
10+
let value = "0";
11+
}
12+
13+
def : Macro {
14+
let name = "OFFLOAD_VERSION_PATCH";
15+
let desc = "Patch version of the Offload API";
16+
let value = "1";
17+
}
18+
119
def : Macro {
220
let name = "OFFLOAD_APICALL";
321
let desc = "Calling convention for all API functions";

offload/new-api/include/offload_api.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,24 @@
1717
extern "C" {
1818
#endif
1919

20+
///////////////////////////////////////////////////////////////////////////////
21+
#ifndef OFFLOAD_VERSION_MAJOR
22+
/// @brief Major version of the Offload API
23+
#define OFFLOAD_VERSION_MAJOR 0
24+
#endif // OFFLOAD_VERSION_MAJOR
25+
26+
///////////////////////////////////////////////////////////////////////////////
27+
#ifndef OFFLOAD_VERSION_MINOR
28+
/// @brief Minor version of the Offload API
29+
#define OFFLOAD_VERSION_MINOR 0
30+
#endif // OFFLOAD_VERSION_MINOR
31+
32+
///////////////////////////////////////////////////////////////////////////////
33+
#ifndef OFFLOAD_VERSION_PATCH
34+
/// @brief Patch version of the Offload API
35+
#define OFFLOAD_VERSION_PATCH 1
36+
#endif // OFFLOAD_VERSION_PATCH
37+
2038
///////////////////////////////////////////////////////////////////////////////
2139
#ifndef OFFLOAD_APICALL
2240
#if defined(_WIN32)

0 commit comments

Comments
 (0)