scatter_add(a, slices, b)¶
Adds given values to specified elements of an array.
This function adds
bto the specified elements of the copy of
a, and returns the copy. The value of the original
ais not changed.
- a (Variable) – A variable.
- slices (int, slice, Ellipsis, None, integer array-like, boolean array-like or tuple of them) – It is an integer, a slice, an ellipsis, a numpy.newaxis, an integer array-like, a boolean array-like or tuple of them.
- b (Variable) – A variable that is scatter added to
a. Its shape has to equal
a[slices]because broadcasting of variables is not supported.
Variableobject which is the result of scatter addition.
It only supports types that are supported by CUDA’s atomicAdd when an integer array is included in
slices. The supported types are
It does not support
slicesthat contains multiple boolean arrays.