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

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

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

# indexAdd

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

`indexAdd(input: Tensor, dim: Long, indices: Tensor, src: Tensor)`: the `index_add` operator. A copy of `input` with rows of `src` ACCUMULATED at `indices` along `dim`: `out[.., indices[i], ..] += src[.., i, ..]`; duplicate indices add up.