Function arm_nn_vec_mat_mul_result_acc_s16

Function Documentation

arm_cmsis_nn_status arm_nn_vec_mat_mul_result_acc_s16(const int16_t *lhs, const int8_t *rhs, const int64_t *effective_bias, int16_t *dst, const int32_t dst_multiplier, const int32_t dst_shift, const int32_t rhs_cols, const int32_t rhs_rows, const int32_t batches, const int32_t batch_offset)

The result of the multiplication is accumulated to the passed result buffer. Multiplies a matrix by a “batched” vector (i.e. a matrix with a batch dimension composed by input vectors independent from each other).

Parameters:
  • lhs[in] Batched vector

  • rhs[in] Weights - input matrix (H(Rows)xW(Columns))

  • effective_bias[in] Bias + lhs_offset * kernel_sum term precalculated into a constant vector.

  • dst[out] Output

  • dst_multiplier[in] Multiplier for quantization

  • dst_shift[in] Shift for quantization

  • rhs_cols[in] Vector/matarix column length

  • rhs_rows[in] Row count of matrix

  • batches[in] Batch size

  • batch_offset[in] Number of timesteps between consecutive batches in input, see arm_nn_lstm_step_s16. Note that the output is always stored with sequential batches.

Returns:

The function returns ARM_CMSIS_NN_SUCCESS