Rate This Document
Findability
Accuracy
Completeness
Readability

KBLASGetVersion

Obtain the BLAS version information.

Interface Definition

int KBLASGetVersion(KBLASVersion *ver)

Parameters

Parameter

Description

Value Range

Input/Output

ver

Product information structure.

The value cannot be NULL.

Output

Return Value

  • Success: The value 1 is returned.
  • Failure: The value 0 is returned.

Examples

 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 "kblas.h"

int main()
{
    KBLASVersion ver;
    int ret = KBLASGetVersion(&ver);
    if (ret == 0 || strlen(ver.productName) == 0 || strlen(ver.productVersion) == 0 ||
        strlen(ver.componentName) == 0 || strlen(ver.componentVersion) == 0 ||
        strlen(ver.componentAppendInfo) == 0 ||
        strlen(ver.softwareName) == 0 || strlen(ver.softwareVersion) == 0) {
            printf("Get information error\n");
            return -1;
    }

    printf("Product Name: %s\n", ver.productName);
    printf("Product Version: %s\n", ver.productVersion);
    printf("Component Name: %s\n", ver.componentName);
    printf("Component Version: %s\n", ver.componentVersion);
    printf("Component AbiVersion: %s\n", ver.componentAbiVersion);
    printf("Component AppendInfo: %s\n", ver.componentAppendInfo);
    printf("Software Name: %s\n", ver.softwareName);
    printf("Software Version: %s\n", ver.softwareVersion);
    return 0;
}

Output:

Product Name: Kunpeng HPCKit
Product Version: 24.0.RC1
Component Name: HPCKit-kml
Component Version: 2.3.0
Component AbiVersion: 1
Component AppendInfo: gcc
Software Name: hpckit-kml-blas
Software Version: 2.3.0

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