ELMTWISE_INFER_SHAPEANDTYPE

Applicable Products

All processors

Header File

#include <graph/operator_reg.h>

Function Usage

Encapsulated macro of common functions, facilitating the development of the InferShape function. This API sets the output shape and data type based on the input shape and data type.

For example, if the input shape is (1, 2, 3, 4) and input data type is float, the macro sets the output shape to (1, 2, 3, 4) and the output data type to float.

Prototype

1
ELMTWISE_INFER_SHAPEANDTYPE(in_name, out_name)

Parameters

Parameter

Input/Output

Description

in_name

Input

Operator input.

out_name

Input

Operator output.

Returns

Success or failure.

Restrictions

None

Example

1
COMMON_INFER_FUNC_REG(DiagD, ELMTWISE_INFER_SHAPEANDTYPE("assist", "y"));