---
title: "ClikaRT::ops::copy_into"
sidebar_label: "copy_into"
description: "Write src into the caller-supplied out buffer (the destination-first spelling of the in-place copy; bind a persistent buffer once, write it every step with no allocation)."
---

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

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

## copy\_into() {#copy_into}

<div class="api-signature">

[`Tensor`](../Tensor.md)`&` **`copy_into`**(<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`Tensor`](../Tensor.md)`&` `out`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`Tensor`](../Tensor.md) `src`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`StreamOrDevice`](../StreamOrDevice.md) `target` `=` `{}`<br />
)

</div>

Write `src` into the caller-supplied `out` buffer (the destination-first spelling of the in-place copy; bind a persistent buffer once, write it every step with no allocation). Dtype conversion is interleaved with the write; a cross-device `src` is transferred first. Returns `out`.

<div class="api-declared">

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

</div>
