Function arm_squared_difference_s8

Function Documentation

arm_cmsis_nn_status arm_squared_difference_s8(const int8_t *input1_data, const cmsis_nn_dims *input1_dims, const int8_t *input2_data, const cmsis_nn_dims *input2_dims, const int32_t input1_offset, const int32_t input1_mult, const int32_t input1_shift, const int32_t input2_offset, const int32_t input2_mult, const int32_t input2_shift, const int32_t left_shift, int8_t *output_data, const cmsis_nn_dims *output_dims, const int32_t out_offset, const int32_t out_mult, const int32_t out_shift, const int32_t out_activation_min, const int32_t out_activation_max)

s8 elementwise squared difference of two tensors with support for broadcasting.

Parameters:
  • left_shift[in] Common left shift applied to both inputs before requantization. Bound: the kernel evaluates (value + offset) << left_shift in int32; with full-range int8 inputs and zero-points the widest operand is 255, so left_shift is at most 23. The scale 1 << left_shift is itself representable up to 30. Not validated by the kernel.

Returns:

ARM_CMSIS_NN_SUCCESS on success, or ARM_CMSIS_NN_ARG_ERROR when a pointer is NULL, a dimension is not positive, the two input shapes are not broadcast-compatible, or the output shape is not their broadcast shape.