我要评分
获取效率
正确性
完整性
易理解

Kunpeng System Class

Obtain the AVX2KI version information.

Avx2kiResult AVX2KI_GetProductVersion(Avx2kiProVersion *packageInfo);

Parameters

Parameter

Description

Value Range

Input/Output

packageInfo

Pointer to the product information structure.

The value cannot be NULL.

Input/Output

Return Value

  • Success: AVX2KI_STS_NO_ERR is returned.
  • Failure: An error code is returned.

Error Code

Error Code

Description

AVX2KI_STS_NULL_PTR_ERR

The Avx2kiProVersion pointer is null.

Example

  1. Create a testavx.cpp file with the following content.
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    #include <stdio.h>
    #include <stdlib.h>
    #include <stdint.h>
    #include "avx2ki.h"
    #include "operatoroverload.h"
    
    void GetProductVersionExample()
    {
        Avx2kiProVersion versionGet;
        Avx2kiResult result = AVX2KI_GetProductVersion(&versionGet);
        if (result == AVX2KI_STS_NO_ERR) {
            printf("Product Name: %s\n", versionGet.productName);
            printf("Product Version: %s\n", versionGet.productVersion);
            printf("Component Name: %s\n", versionGet.componentName);
            printf("Component Version: %s\n", versionGet.componentVersion);
            printf("Component AppendInfo: %s\n", versionGet.componentAppendInfo);
            printf("Software Name: %s\n", versionGet.softwareName);
            printf("Software Version: %s\n", versionGet.softwareVersion);
        }
    }
    
    int main(void) {
        GetProductVersionExample();
        return 0;
    }
    
  2. Perform the compilation.
    g++ testavx.cpp -o testavx -I/usr/local/ksl/include -L/usr/local/ksl/lib -lavx2ki
    Output:
    1
    2
    3
    4
    5
    6
    7
    Product Name: Kunpeng Boostkit
    Product Version: 23.0.RC2
    Component Name: BoostKit-ksl
    Component Version: 1.0.0
    Component AppendInfo: gcc
    Software Name: boostkit-ksl-avx2neon
    Software Version: 1.0.0
    

    The version number and compile time are subject to the running results in your environment. The preceding results are for reference only.