Function arm_pack_f16

Function Documentation

arm_cmsis_nn_status arm_pack_f16(const float16_t *const *input_data, int32_t num_inputs, int32_t input_dims, const int32_t *input_shape, int32_t axis, float16_t *output_data)

Stack float32 tensors of equal shape along a new axis (TFLite PACK).

The output shape is input_shape with num_inputs inserted at axis; input s lands at index s of that axis. Bit copy, NaN/Inf/-0/subnormal payloads preserved. Inputs must not overlap the output. Rank-0 inputs (input_dims == 0, axis == 0) stack into a vector.

Parameters:
  • input_data[in] Array of num_inputs pointers to the flattened (row-major) inputs.

  • num_inputs[in] Number of inputs (>= 1).

  • input_dims[in] Number of dimensions of each input (>= 0).

  • input_shape[in] Shape shared by every input (may be NULL when input_dims is 0).

  • axis[in] Position of the new axis in the output (0 <= axis <= input_dims).

  • output_data[out] Pointer to the flattened output.

Returns:

ARM_CMSIS_NN_SUCCESS, or ARM_CMSIS_NN_ARG_ERROR (output untouched) on an invalid rank, axis, shape entry, NULL pointer or an element count above INT32_MAX.