function
Pad a tensor with a constant value.
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
| 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. |