ClikaRT::ops::index_add
function
index_add()
A copy of input with rows of src ACCUMULATED at indices along dim: out[.., indices[i], ..] += src[.., i, ..]; duplicate indices add up.
Parameters
input: the starting values.dim: the addressed axis.indices: 1-D integer positions (Int32/Int64).src: the rows to add; itsdimextent equalsindices' length, every other extent matchesinput.
Throws
ClikaRT::Error: (INVALID_ARGUMENT) when the shapes disagree per the rule above or the index dtype is wrong (code_name()carries the reason).
Returns: a new tensor shaped like input.
Declared in ClikaRT/compute/ops.h, line 2460