ClikaRT::ops::index_add
function
index_add()
A copy of x with rows of src ACCUMULATED at indices along dim: out[.., indices[i], ..] += src[.., i, ..]; duplicate indices add up.
Parameters
x: 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 matchesx.
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 x.
Declared in ClikaRT/compute/ops.h, line 2440