---
title: 数据结构
description: "提供KML_LAPACK库函数的数据类型和存储类型说明。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengboostkithistory/240RC1/accel/kunpengaccel_kml_16_0205.html
sourcePath: /source/zh/kunpengboostkithistory/240RC1/accel/kunpengaccel_kml_16_0205.html
indexId: c82ee7c5b8edb5f4b602870188761d78c9f30fc65372338834ff9bfd9ab45c4c76
---
# 数据结构

提供KML_LAPACK库函数的数据类型和存储类型说明。

#### 数据类型

| 数据类型 | 类型描述 |
| --- | --- |
| s | 单精度浮点类型 |
| d | 双精度浮点类型 |
| c | 单精度复数类型 |
| z | 双精度复数类型 |


#### 存储类型

普通矩阵按照Fortran的列优先方式存储（column-major），数据结构中涉及到的索引从1开始（如ipiv中保存的值）。

压缩存储矩阵（packed）：以列优先方式存储，对于实对称、共轭对称、上三角或下三角矩阵，只需一半的元素即可确定整个矩阵，因此可使用压缩格式只保存这一部分数据。对于大小的压缩存储矩阵A，对应元素的存储位置如下：

- 上三角存储（uplo='U'，且）：。
- 下三角存储（uplo='L'，且）：。
