---
title: SetOutput
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/others/dataflowdevg/udfrefc_23_00109.html
sourcePath: /source/zh/canncommercial/900/others/dataflowdevg/udfrefc_23_00109.html
indexId: a3b2cf0142e474f2624a58e521d98109fa59b179d95033e3f6e07d47b44f001771
---
# SetOutput

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | x |
| Atlas 推理系列产品 | x |
| Atlas 训练系列产品 | x |


#### 函数功能

设置指定index和options的输出，该函数供func函数调用。


#### 函数原型

```
int32_t SetOutput(uint32_t outIdx, std::shared_ptr<FlowMsg> outMsg, const OutOptions &options) = 0
```


#### 参数说明

| 参数名 | 输入/输出 | 描述 |
| --- | --- | --- |
| outIdx | 输入 | 输出index，从0开始。 |
| outMsg | 输入 | 输出信息。 |
| options | 输入 | 输出对应的OutOptions。 |


#### 返回值

- 0：SUCCESS。
- other：FAILED，具体请参考  UDF错误码
。


#### 异常处理

无。


#### 约束说明

无。
