---
title: KSPBLASGetVersion
description: "获取SPBLAS产品版本信息："
url: https://www.hikunpeng.com/document/detail/zh/kunpengaccel/math-lib/devg-kml/kunpengaccel_kml_0049.html
sourcePath: /source/zh/kunpengaccel/math-lib/devg-kml/kunpengaccel_kml_0049.html
indexId: 08619ade6964e6bd2d1aaf3341f4ad26d2c6a3dfee3b0cb9ed33a601f2a06dc168
---
# KSPBLASGetVersion

获取SPBLAS产品版本信息：

int KSPBLASGetVersion(KBLASVersion *ver)

#### 参数

| 参数名 | 描述 | 取值范围 | 输入/输出 |
| --- | --- | --- | --- |
| ver | 产品信息结构体。 | 非空 | 输出 |


#### 返回值

- 成功：返回1。
- 失败：返回0。


#### 示例

```
#include <stdio.h>
#include "kspblas.h"

int main()
{
        KSPBLASVersion* ver = (KSPBLASVersion*)malloc(sizeof(KSPBLASVersion));
        int status = KSPBLASGetVersion(ver);
        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 AppendInfo    : %s\n", ver->componentAppendInfo);
        printf("Software Name           : %s\n", ver->softwareName);
        printf("Software Version        : %s\n", ver->softwareVersion);
        free(ver);
        return 0;
}
```

运行结果：
```
Product Name            : Kunpeng HPCKit
Product Version         : 24.0.RC1
Component name          : HPCKit-kml
Component Version       : 2.3.0
Component AppendInfo    : gcc
Software Name           : hpckit-kml-spblas
Software Version        : 2.3.0
```


以上版本号和编译时间以实际运行结果为准，上述结果仅供参考。
