---
title: "ClikaRT::ops::reflect_pad"
sidebar_label: "reflect_pad"
description: "pad in mirror mode: the padding reflects the tensor across each padded edge. Same (lo, hi) pair layout as constant_pad. Copies."
---

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

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

## reflect\_pad() {#reflect_pad}

<div class="api-signature">

[`Tensor`](../Tensor.md) **`reflect_pad`**([`Tensor`](../Tensor.md) `input`, [`ClikaRT::Span`](../Span.md)`<const` [`ScalarOrTensor`](../ScalarOrTensor.md)`>` `pad`)

</div>

[`pad`](./pad.md#pad) in mirror mode: the padding reflects the tensor across each padded edge. Same `(lo, hi)` pair layout as [`constant_pad`](./constant_pad.md#constant_pad). Copies.

**Throws**

- `ClikaRT::Error`: (`INVALID_ARGUMENT`) when the pair list exceeds the rank or a width exceeds what the extent can mirror (`code_name()` carries the reason).

**Returns:** a new tensor with each padded axis grown by `lo + hi`.

<div class="api-declared">

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

</div>
