convert function
Convert a variable to another format(possibily added after input).
Args:
- input: A variable.
- format: The target format.
Returns:
- A variable. If
inputis alreadyformat, then returninputdirectly, otherwize add a variable afterinputwithformat.
Implementation
VARP convert(VARP input, DimensionFormat format) =>
VARP.fromPointer(C.mnn_expr_Convert(input.ptr, format.value));