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

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

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

# indexAddInPlace

[common]\
fun [indexAddInPlace](indexAddInPlace.md)(self: [Tensor](../Tensor/index.md), dim: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), indices: [Tensor](../Tensor/index.md), src: [Tensor](../Tensor/index.md)): [Tensor](../Tensor/index.md)

`indexAddInPlace(self: Tensor, dim: Long, indices: Tensor, src: Tensor)`: the `index_add_` operator. In-place `index_add`: `self[.., indices[i], ..] += src[.., i, ..]`; same arguments and error conditions as `index_add()`. Accumulates through `self`'s storage (a strided view reaches its base buffer; aliases observe the write). 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.