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

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

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

# scatterAddInPlace

[common]\
fun [scatterAddInPlace](scatterAddInPlace.md)(self: [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)

`scatterAddInPlace(self: Tensor, dim: Long, index: Tensor, src: Tensor, deterministic: Boolean = false)`: the `scatter_add_` operator. In-place `scatter_add`: accumulates through `self` at the indexed positions; same arguments (incl. `deterministic`) and error conditions as `scatter_add()`. A strided view reaches its base buffer. Returns `self` under the value surface, `Result<void>` under the `Result` surface; `CLIKART_CHECK` is the mode-stable spelling. Writes through `self` and returns it, so calls chain.