Function arm_split_f32

Function Documentation

arm_cmsis_nn_status arm_split_f32(const float32_t *input_data, int32_t input_dims, const int32_t *input_shape, int32_t axis, int32_t num_splits, const int32_t *split_dims, float32_t *const *output_data)

Split a float32 tensor of any rank into several tensors along one axis.

Inverse of arm_concatenation_f32; per-split lengths also cover SPLIT_V. Output s has the input shape with input_shape[axis] replaced by split_dims[s]. Bit copy, NaN/Inf/-0/subnormal payloads preserved. Outputs must not overlap the input. A dimension of 0 is accepted and copies nothing.

Parameters:
  • input_data[in] Pointer to the flattened (row-major) input.

  • input_dims[in] Number of dimensions in input_shape (>= 1).

  • input_shape[in] Input shape; input_shape[axis] must equal the sum of split_dims.

  • axis[in] Axis to split along (0 <= axis < input_dims).

  • num_splits[in] Number of outputs (>= 1).

  • split_dims[in] Array of length num_splits: each output’s extent along axis.

  • output_data[out] Array of num_splits pointers to the flattened outputs.

Returns:

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