---
title: KesVectorCreate
description: "KesReturnCode KesVectorCreate(KesVector *X, KesScalarType type, KesVectorFormat format);"
url: https://www.hikunpeng.com/document/detail/zh/kunpengboostkithistory/2300/accel/kunpengaccel_kml_16_0731.html
sourcePath: /source/zh/kunpengboostkithistory/2300/accel/kunpengaccel_kml_16_0731.html
indexId: a14b9d91de25557e444d52beee0154a178697e4e5691184dbc8d9518bbfbf5a774
---
# KesVectorCreate

#### 接口定义

KesReturnCode KesVectorCreate(KesVector *X, KesScalarType type, KesVectorFormat format);


#### 接口说明

创建向量，并指定数据类型、向量形式。


#### 参数

| 参数名 | 类型 | 描述 | 输入/输出 |
| --- | --- | --- | --- |
| X | KesVector \* | 向量句柄，不能为空指针。 | 输入/输出 |
| type | KesScalarType | 数据类型。 | 输入 |
| format | KesVectorFormat | 向量类型。 | 输入 |


| KesVectorFormat | 类型描述 |
| --- | --- |
| KES\_EMPTY\_VECTOR | 空向量 |
| KES\_DENSE | 采用BLAS数组列优先存储的方式，向量数据由（首元素指针，向量长度，向量个数，leading dimension）指定。 |


| KesScalarType | 类型描述 | 对应C的类型 |
| --- | --- | --- |
| KES\_SCALAR\_FP32 | 单精度实数浮点类型。 | float |
| KES\_SCALAR\_FP32C | 单精度复数浮点类型。 | float \_Complex |
| KES\_SCALAR\_FP64 | 双精度实数浮点类型。 | double |
| KES\_SCALAR\_FP64C | 双精度复数浮点类型。 | double \_Complex |
