---
title: "scatterAdd"
sidebar_label: "scatterAdd"
description: "Kotlin binding reference: scatterAdd."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.runtime](../index.md)/[Ops](index.md)/[scatterAdd](scatterAdd.md)

# scatterAdd

[common]\
fun [scatterAdd](scatterAdd.md)(input: [Tensor](../Tensor/index.md), dim: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), index: [Tensor](../Tensor/index.md), src: [Tensor](../Tensor/index.md), deterministic: [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) = false): [Tensor](../Tensor/index.md)

`scatterAdd(input: Tensor, dim: Long, index: Tensor, src: Tensor, deterministic: Boolean = false)`: the `scatter_add` operator. `scatter` with ACCUMULATION: `out[.., index[p], ..] += src[p]`; duplicate destinations sum.