---
title: KesVectorSetDim
description: "KesReturnCode KesVectorSetDim(KesVector X, int nRows, int nCols);"
url: https://www.hikunpeng.com/document/detail/zh/hpchistory/hpckit/develop2400/kunpengaccel_kml_0949.html
sourcePath: /source/zh/hpchistory/hpckit/develop2400/kunpengaccel_kml_0949.html
indexId: 456cf7cb38b1f9e703ba65bc29c720c0738127542f3b0799d92f32d355a7db5b67
---
# KesVectorSetDim

#### 接口定义

KesReturnCode KesVectorSetDim(KesVector X, int nRows, int nCols);


#### 接口说明

设置向量的局部长度和个数。


#### 参数

| 参数名 | 类型 | 描述 | 输入/输出 |
| --- | --- | --- | --- |
| X | KesVector | 向量句柄，必须为已经创建过的KES\_DENSE格式的向量。 | 输入/输出 |
| nRows | int | 向量的局部长度。 | 输入 |
| nCols | int | 向量个数。 | 输入 |
