ClikaRT::ops::scatter_add
function
scatter_add()
Tensor scatter_add(
Tensor input,
int64_t dim,
Tensor index,
Tensor src,
bool deterministic = false
)
scatter with ACCUMULATION: out[.., index[p], ..] += src[p]; duplicate destinations sum.
Parameters
deterministic: selects the deterministic accumulate path on devices where the faster default is run-to-run-variable on duplicate destinations (device atomics); the CPU is deterministic regardless of the flag. Defaultfalse.
Throws
ClikaRT::Error: (INVALID_ARGUMENT) whendimis out of range, the shapes disagree, 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 2599