max function

VARP max(
  1. VARP x,
  2. VARP y, {
  3. List<double> coeff = const [],
})

Compute the element-wise max

Args:

  • x: A variable. Must be one of the following types: Halide_Type_Float
  • y: A variable. Must be one of the following types: Halide_Type_Float
  • coeff: blob-wise coefficients

Returns:

  • The max variable.

Implementation

VARP max(VARP x, VARP y, {List<double> coeff = const []}) {
  final (p, size) = coeff.toNativeArrayF32();
  final rval = VARP.fromPointer(C.mnn_expr_Max(x.ptr, y.ptr, p, size));
  calloc.free(p);
  return rval;
}