---
title: "ClikaRT::ops::replicate_pad"
sidebar_label: "replicate_pad"
description: "pad in edge-replicate mode: the padding repeats each padded edge's value. 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>

## replicate\_pad() {#replicate_pad}

<div class="api-signature">

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

</div>

[`pad`](./pad.md#pad) in edge-replicate mode: the padding repeats each padded edge's value. 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 (`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 3352

</div>
