---
title: "ClikaRT::ops::fill_"
sidebar_label: "fill_"
description: "In-place fill: overwrites every element of self with value; same arguments and error conditions as fill(). 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>

## fill\_() {#fill_}

<div class="api-signature">

[`Tensor`](../Tensor.md)`&` **`fill_`**(<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`Tensor`](../Tensor.md)`&` `self`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`ScalarOrTensor`](../ScalarOrTensor.md) `value`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`StreamOrDevice`](../StreamOrDevice.md) `device` `=` `{}`<br />
)

</div>

In-place [`fill`](./fill.md#fill): overwrites every element of `self` with `value`; same arguments and error conditions as [`fill()`](./fill.md#fill). 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 2332

</div>
