scatterND function

VARP scatterND(
  1. VARP indices,
  2. VARP updates,
  3. VARP shape, {
  4. VARP? input,
  5. int? reduction,
})

Implementation

VARP scatterND(VARP indices, VARP updates, VARP shape, {VARP? input, int? reduction}) => switch ((
  input,
  reduction,
)) {
  (null, null) => VARP.fromPointer(C.mnn_expr_ScatterNd(indices.ptr, updates.ptr, shape.ptr)),
  (VARP(), null) => VARP.fromPointer(C.mnn_expr_ScatterNd_1(indices.ptr, updates.ptr, shape.ptr, input!.ptr)),
  (null, int()) => VARP.fromPointer(C.mnn_expr_ScatterNd_2(indices.ptr, updates.ptr, shape.ptr, reduction!)),
  (VARP(), int()) => VARP.fromPointer(
    C.mnn_expr_ScatterNd_3(indices.ptr, updates.ptr, shape.ptr, input!.ptr, reduction!),
  ),
};