convert function

VARP convert(
  1. VARP input,
  2. DimensionFormat format
)

Convert a variable to another format(possibily added after input).

Args:

  • input: A variable.
  • format: The target format.

Returns:

  • A variable. If input is already format, then return input directly, otherwize add a variable after input with format.

Implementation

VARP convert(VARP input, DimensionFormat format) =>
    VARP.fromPointer(C.mnn_expr_Convert(input.ptr, format.value));