negative function

VARP negative(
  1. VARP x
)

Computes numerical negative value element-wise.

x = MNN.const((-1.0, -2.0, 3.0), (3, ))
x = MNN.negative(x) #(1.0, 2.0, -3.0)

Args:

  • x: A variable. Must be one of the following types: Halide_Type_Int or Halide_Type_Float

Returns:

  • A variable. Has the same type as x.

Implementation

VARP negative(VARP x) => VARP.fromPointer(C.mnn_expr_Negative(x.ptr));