---
title: "ClikaRT::ops::masked_scatter_"
sidebar_label: "masked_scatter_"
description: "In-place masked_scatter: writes src's leading elements through self where mask is true; same arguments and error conditions as masked_scatter(). A view input writes through its base storage."
---

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

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

## masked\_scatter\_() {#masked_scatter_}

<div class="api-signature">

[`Tensor`](../Tensor.md)`&` **`masked_scatter_`**(<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`Tensor`](../Tensor.md)`&` `self`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`Tensor`](../Tensor.md) `mask`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`Tensor`](../Tensor.md) `source`<br />
)

</div>

In-place [`masked_scatter`](./masked_scatter.md#masked_scatter): writes `src`'s leading elements through `self` where `mask` is true; same arguments and error conditions as [`masked_scatter()`](./masked_scatter.md#masked_scatter). A view input writes through its base storage. Returns `self` under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling.

<div class="api-declared">

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

</div>
