CreateOperation

Description

Creates an Operation.

Definition

1
template <typename OpParam> Status CreateOperation(const OpParam &opParam, Operation **operation);

Parameters

Parameter

Input/Output

Description

opParam

Input

Parameter information for creating an operation. For details about the parameter types, see the atb/infer_op_params.h and atb/train_op_params.h files.

operation

Output

Level-2 pointer to the newly created operation.

Returns

Type

Input/Output

Description

Status

Output

NO_ERROR on success; else failure.

Restrictions

It is used with together with DestroyOperation. First call CreateOperation and then call DestroyOperation.

After the Operation created by calling CreateOperation is used, call DestroyOperation to destroy it. Otherwise, a memory leak occurs.

The parameters in atb/infer_op_params.h and atb/train_op_params.h are supported.