RegProcFunc

Applicability

Product

Supported

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

x

Atlas inference products

x

Atlas training products

x

Function Description

Registers the multi-FlowFunc processing function by using MetaMultiFunc Registration Function Macro.

Prototype

  • This function is used when a common FlowFunc is registered, that is, when the input of the FlowFunc is flowMsg.
    1
    FlowFuncRegistrar &RegProcFunc(const char *flowFuncName, const CUSTOM_PROC_FUNC &func)
    
  • This function is used when a streaming input FlowFunc (the function's input parameter is a queue) is registered, that is, when the input of the FlowFunc is flowMsgQueue.
    1
    FlowFuncRegistrar &RegProcFunc(const char *flowFuncName, const CUSTOM_PROC_FUNC_WITH_Q &func)
    

Command-Line Options

Parameter

Input/Output

Description

flowFuncName

Input

Name of FlowFunc. The value cannot be NULL and must end with \0.

func

Input

Processing function of multiple FlowFunc. The prototype of the processing function is as follows:

using CUSTOM_PROC_FUNC = std::function<int32_t(
T *, const std::shared_ptr<MetaRunContext> &, const std::vector<std::shared_ptr<FlowMsg>> &)>;
Or
using CUSTOM_PROC_FUNC_WITH_Q = std::function<int32_t(
T *, const std::shared_ptr<MetaRunContext> &, const std::vector<std::shared_ptr<FlowMsgQueue>> &)>;

Returns

A FlowFuncRegistrar object.

Troubleshooting

None

Constraints

None