---
title: "ClikaRT::ops::scatter_"
sidebar_label: "scatter_"
description: "In-place scatter: writes through self at the indexed positions; same arguments and error conditions as scatter(). Writes through self's storage (a strided view reaches its base buffer)."
---

<!-- Generated by tools/doxygen2mdx from Doxygen XML. Do not edit. -->

<span class="api-kind api-kind--function">function</span>

## scatter\_() {#scatter_}

<div class="api-signature">

[`Tensor`](../Tensor.md)`&` **`scatter_`**(<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`Tensor`](../Tensor.md)`&` `self`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;`int64_t` `dim`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`Tensor`](../Tensor.md) `index`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`ScalarOrTensor`](../ScalarOrTensor.md) `src`<br />
)

</div>

In-place [`scatter`](./scatter.md#scatter): writes through `self` at the indexed positions; same arguments and error conditions as [`scatter()`](./scatter.md#scatter). Writes through `self`'s storage (a strided view reaches its base buffer). Returns `self` for chaining.

<div class="api-declared">

Declared in `ClikaRT/compute/ops.h`, line 2655

</div>
