GetProductVersion
Obtain information about the installed HMPP, including the software name, software version, product version, and product build time.
The function interface is declared as follows:
HmppResult HMPP_GetProductVersion(HmppProVersion *packageInfo);
Return Value
- Success: HMPP_STS_NO_ERR
- Failure: An error code is returned.
Parameters
Parameter |
Description |
Value Range |
Input/Output |
|---|---|---|---|
packageInfo |
Destination structure, which stores the output HMPP product information. |
The value cannot be NULL. |
Output |
Error Codes
Error Code |
Description |
|---|---|
HMPP_STS_NULL_PTR_ERR |
The HmppProVersion pointer is NULL. |
Example
void HMPP_GetProductVersion_Example()
{
HmppProVersion versionGet;
HmppResult result = HMPP_GetProductVersion(&versionGet);
HmppProVersion *version = &versionGet;
if (result == HMPP_STS_NO_ERR) {
printf("Product Name: %s\n", version->productName);
printf("Product Version: %s\n", version->productVersion);
printf("Component Name: %s\n", version->componentName);
printf("Component Version: %s\n", version->componentVersion);
printf("Component AppendInfo: %s\n", version->componentAppendInfo);
printf("Software Name: %s\n", version->softwareName);
printf("Software Version: %s\n", version->softwareVersion);
}
}
Output:
Product Name: Kunpeng Boostkit Product Version: 23.0.RC2 Component Name: BoostKit-hmpp Component Version: 1.7.0 Component AppendInfo: gcc Software Name: boostkit-hmpp Software Version: 1.7.0
The version number and compile time in the example above are for reference only.
Parent topic: Basic Functions