---
title: KesVectorSetComm
description: "KesReturnCode KesVectorSetComm(KesVector X, KesCommDirection direction, MPI_Comm comm);"
url: https://www.hikunpeng.com/document/detail/zh/kunpengaccel/math-lib/devg-kml/kunpengaccel_kml_0952.html
sourcePath: /source/zh/kunpengaccel/math-lib/devg-kml/kunpengaccel_kml_0952.html
indexId: 4c0cf0ea04f1f815c9de8c83c615926973bd112fb0c524f510d218119795417368
---
# KesVectorSetComm

#### 接口定义

KesReturnCode KesVectorSetComm(KesVector X, KesCommDirection direction, MPI_Comm comm);


#### 接口说明

设置向量的通讯子。


#### 参数

| 参数名 | 类型 | 描述 | 输入/输出 |
| --- | --- | --- | --- |
| X | KesVector | 向量句柄，不能为空指针。 | 输入/输出 |
| direction | KesCommDirection | 通讯子类型，行分割的通讯子/列通讯子。 | 输入 |
| comm | MPI\_Comm | MPI通讯子。 | 输入 |


| KesCommDirection | 类型描述 |
| --- | --- |
| KES\_ROW | 行分割的通讯子。 |
| KES\_COL | 列通讯子（目前仅支持MPI\_COMM\_SELF）。 |
