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

#### 产品支持情况

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


#### 函数功能

注册多flow func处理函数，结合MetaMultiFunc注册函数宏来注册flow func。


#### 函数原型

- 注册普通flow func，即flow func输入为flowMsg时使用。
  1 FlowFuncRegistrar &RegProcFunc(const char *flowFuncName, const CUSTOM_PROC_FUNC &func)

- 注册流式输入（即函数入参为队列）flow func，即flow func输入为flowMsgQueue时使用。
  1 FlowFuncRegistrar &RegProcFunc(const char *flowFuncName, const CUSTOM_PROC_FUNC_WITH_Q &func)


#### 参数说明

| 参数名 | 输入/输出 | 描述 |
| --- | --- | --- |
| flowFuncName | 输入 | flow func的名称。不可以设置为NULL，必须以“\0”结尾。 |
| func | 输入 | 多flow func的处理函数，处理函数原型为 using CUSTOM\_PROC\_FUNC = std::function<int32\_t( T \*, const std::shared\_ptr<MetaRunContext> &, const std::vector<std::shared\_ptr<FlowMsg>> &)>; 或 using CUSTOM\_PROC\_FUNC\_WITH\_Q = std::function<int32\_t( T \*, const std::shared\_ptr<MetaRunContext> &, const std::vector<std::shared\_ptr<FlowMsgQueue>> &)>; |


#### 返回值

返回当前的FlowFuncRegistrar类对象


#### 异常处理

无。


#### 约束说明

无。
