Files
rocm-systems/projects/rocm-core/rocm_version.h.in
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

59 lines
1.4 KiB
C
Raw Normal View History

2025-10-21 23:04:23 -04:00
//Copyright © Advanced Micro Devices, Inc., or its affiliates.
//SPDX-License-Identifier: MIT
2022-10-18 10:35:37 +05:30
#ifndef _ROCM_VERSION_H_
#define _ROCM_VERSION_H_
#ifdef __cplusplus
extern "C" {
2025-10-17 09:10:18 +05:30
#endif // __cplusplus
2022-10-18 10:35:37 +05:30
2025-10-21 23:04:23 -04:00
#if defined(_WIN32) || defined(__CYGWIN__)
#define LIB_API_PUBLIC __declspec(dllexport)
#define ATTRIBUTE_NON_NULL
#else
#define LIB_API_PUBLIC __attribute__((visibility("default")))
#define ATTRIBUTE_NON_NULL __attribute__((nonnull))
#endif
2022-10-18 10:35:37 +05:30
2023-01-06 12:37:49 +05:30
#define ROCM_VERSION_MAJOR @VERSION_MAJOR@
#define ROCM_VERSION_MINOR @VERSION_MINOR@
#define ROCM_VERSION_PATCH @VERSION_PATCH@
2022-10-18 10:35:37 +05:30
#define ROCM_BUILD_INFO "@PACKAGE_BUILD_INFO@"
typedef enum {
VerSuccess=0,
2025-10-17 09:10:18 +05:30
VerIncorrectParameters,
VerMemoryAllocationFailed,
2022-10-18 10:35:37 +05:30
VerValuesNotDefined,
VerErrorMAX //This should always be last value in the enumerations
} VerErrors;
2025-10-17 09:10:18 +05:30
// API for getting the version
2025-10-21 23:04:23 -04:00
// Return val : VerErros : API execution status. The parameters are valid only when the execution status is SUCCESS==0
LIB_API_PUBLIC VerErrors getROCmVersion(unsigned int* Major, unsigned int* Minor, unsigned int* Patch) ATTRIBUTE_NON_NULL ;
2022-10-18 10:35:37 +05:30
// Usage :
// int mj=0,mn=0,p=0,ret=0;
// ret=getROCMVersion(&mj,&mn,&p);
// if(ret !=VerSuccess ) // error occured
//
// check for the values and
//
//API for building build info on console
LIB_API_PUBLIC VerErrors printBuildInfo();
#ifdef __cplusplus
} // end extern "C" block
#endif
#endif //_ROCM_VERSION_H_ header guard