aboutsummaryrefslogtreecommitdiff
path: root/include/odp/api/spec/version.h.in
diff options
context:
space:
mode:
Diffstat (limited to 'include/odp/api/spec/version.h.in')
-rw-r--r--include/odp/api/spec/version.h.in32
1 files changed, 23 insertions, 9 deletions
diff --git a/include/odp/api/spec/version.h.in b/include/odp/api/spec/version.h.in
index f5e9e9c8b..19c5f2ec1 100644
--- a/include/odp/api/spec/version.h.in
+++ b/include/odp/api/spec/version.h.in
@@ -1,18 +1,16 @@
-/* Copyright (c) 2013, Linaro Limited
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright (c) 2013-2018 Linaro Limited
+ * Copyright (c) 2020-2021 Nokia
*/
-
/**
* @file
*
* ODP version
*/
-#ifndef ODP_API_VERSION_H_
-#define ODP_API_VERSION_H_
+#ifndef ODP_API_SPEC_VERSION_H_
+#define ODP_API_SPEC_VERSION_H_
#include <odp/visibility_begin.h>
#ifdef __cplusplus
@@ -21,8 +19,7 @@ extern "C" {
/**
* @defgroup odp_version ODP VERSION
- * @details
- * <b> ODP API and implementation versions </b>
+ * API and implementation versions
*
* ODP API version is identified by ODP_VERSION_API_XXX preprocessor macros.
* In addition to these macros, API calls can be used to identify implementation
@@ -57,6 +54,23 @@ extern "C" {
#define ODP_VERSION_API_MINOR @ODP_VERSION_API_MINOR@
/**
+ * ODP API version number macro
+ *
+ * Macro to build a version number for comparisons
+ */
+#define ODP_VERSION_API_NUM(gen, ma, mi) ((gen) << 24 | (ma) << 16 | (mi) << 8)
+
+/**
+ * ODP API version number
+ *
+ * API version number for comparisons against ODP_VERSION_API_NUM()
+ * macro output.
+ */
+#define ODP_VERSION_API ODP_VERSION_API_NUM(ODP_VERSION_API_GENERATION, \
+ ODP_VERSION_API_MAJOR, \
+ ODP_VERSION_API_MINOR)
+
+/**
* ODP API version string
*
* The API version string defines ODP API version in this format: