CMSIS-NN  Version 3.1.0
CMSIS NN Software Library
 All Data Structures Files Functions Variables Enumerations Enumerator Macros Groups Pages
arm_nn_mat_mul_kernel_s16.c File Reference


q15_t * arm_nn_mat_mult_kernel_s16 (const q7_t *input_a, const q15_t *input_b, const int32_t output_ch, const int32_t *out_shift, const int32_t *out_mult, const int16_t activation_min, const int16_t activation_max, const int32_t num_col_a, const int64_t *const output_bias, q15_t *out_0)
 Matrix-multiplication function for convolution with per-channel requantization for 16 bits convolution. More...

Function Documentation

q15_t* arm_nn_mat_mult_kernel_s16 ( const q7_t *  input_a,
const q15_t *  input_b,
const int32_t  output_ch,
const int32_t *  out_shift,
const int32_t *  out_mult,
const int16_t  activation_min,
const int16_t  activation_max,
const int32_t  num_col_a,
const int64_t *const  output_bias,
q15_t *  out_0 
[in]input_apointer to operand A
[in]input_bpointer to operand B, always consists of 2 vectors.
[in]output_chnumber of rows of A
[in]out_shiftpointer to per output channel requantization shift parameter.
[in]out_multpointer to per output channel requantization multiplier parameter.
[in]activation_minminimum value to clamp the output to. Range : int16
[in]activation_maxmaximum value to clamp the output to. Range : int16
[in]num_col_anumber of columns of A
[in]output_biasper output channel bias. Range : int64
[in,out]out_0pointer to output
The function returns one of the two
  1. The incremented output pointer for a successful operation or
  2. NULL if implementation is not available.

This function does the matrix multiplication of weight matrix for all output channels with 2 columns from im2col and produces two elements/output_channel. The outputs are clamped in the range provided by activation min and max. Supported framework: TensorFlow Lite micro.

References arm_nn_read_q15x2_ia(), arm_nn_requantize(), arm_nn_requantize_s64(), MAX, MIN, and REDUCE_MULTIPLIER.

Referenced by arm_convolve_fast_s16().