Skip to content
heliaCORE
API reference
HELIA HUB

Pad Layer Functions:

Machine-readable model

function

Pad a tensor with a constant value.

Include/arm_nnfunctions_flt.h:1361

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 of arm_pad_f32
NameTypeDirectionDescription
inputconst float32_t *inPointer to the input tensor data.
outputfloat32_t *outPointer to the output tensor data, sized by `input_size` plus `pre_pad` and `post_pad` in every dimension.
pad_valuefloat32_tinValue to pad with.
input_sizeconst cmsis_nn_dims *inInput tensor dimensions.
pre_padconst cmsis_nn_dims *inPadding to apply before the data in each dimension.
post_padconst cmsis_nn_dims *inPadding to apply after the data in each dimension.
Returns of arm_pad_f32
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.
function

Pad a tensor with a constant value.

Include/arm_nnfunctions_flt.h:3255

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 of arm_pad_f16
NameTypeDirectionDescription
inputconst float16_t *inPointer to the input tensor data.
outputfloat16_t *outPointer to the output tensor data, sized by `input_size` plus `pre_pad` and `post_pad` in every dimension.
pad_valuefloat16_tinValue to pad with.
input_sizeconst cmsis_nn_dims *inInput tensor dimensions.
pre_padconst cmsis_nn_dims *inPadding to apply before the data in each dimension.
post_padconst cmsis_nn_dims *inPadding to apply after the data in each dimension.
Returns of arm_pad_f16
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.