# heliaCORE.Pad

## arm_pad_f32

`function` · `c`

```c
arm_cmsis_nn_status arm_pad_f32(
    const float32_t *input,
    float32_t *output,
    float32_t pad_value,
    const cmsis_nn_dims *input_size,
    const cmsis_nn_dims *pre_pad,
    const cmsis_nn_dims *post_pad
)
```

Pad a tensor with a constant value.

**Parameters**

| Name | Type | Direction | Description |
| --- | --- | --- | --- |
| input | const float32_t * | in | Pointer to the input tensor data. |
| output | float32_t * | out | Pointer to the output tensor data, sized by `input_size` plus `pre_pad` and `post_pad` in every dimension. |
| pad_value | float32_t | in | Value to pad with. |
| input_size | const cmsis_nn_dims * | in | Input tensor dimensions. |
| pre_pad | const cmsis_nn_dims * | in | Padding to apply before the data in each dimension. |
| post_pad | const cmsis_nn_dims * | in | Padding to apply after the data in each dimension. |

**Returns**

| Name | Type | Description |
| --- | --- | --- |
|  |  | `ARM_CMSIS_NN_SUCCESS` on success, or `ARM_CMSIS_NN_ARG_ERROR` when a pointer is NULL or a padded output dimension is not positive. |

Source: `Include/arm_nnfunctions_flt.h:1361`

## arm_pad_f16

`function` · `c`

```c
arm_cmsis_nn_status arm_pad_f16(
    const float16_t *input,
    float16_t *output,
    float16_t pad_value,
    const cmsis_nn_dims *input_size,
    const cmsis_nn_dims *pre_pad,
    const cmsis_nn_dims *post_pad
)
```

Pad a tensor with a constant value.

**Parameters**

| Name | Type | Direction | Description |
| --- | --- | --- | --- |
| input | const float16_t * | in | Pointer to the input tensor data. |
| output | float16_t * | out | Pointer to the output tensor data, sized by `input_size` plus `pre_pad` and `post_pad` in every dimension. |
| pad_value | float16_t | in | Value to pad with. |
| input_size | const cmsis_nn_dims * | in | Input tensor dimensions. |
| pre_pad | const cmsis_nn_dims * | in | Padding to apply before the data in each dimension. |
| post_pad | const cmsis_nn_dims * | in | Padding to apply after the data in each dimension. |

**Returns**

| Name | Type | Description |
| --- | --- | --- |
|  |  | `ARM_CMSIS_NN_SUCCESS` on success, or `ARM_CMSIS_NN_ARG_ERROR` when a pointer is NULL or a padded output dimension is not positive. |

Source: `Include/arm_nnfunctions_flt.h:3255`
