CMSIS-NN  
CMSIS NN Software Library
 
Loading...
Searching...
No Matches
Private

Content

 Structure Types
 Data structure types used by private functions.
 
 Convolution
 
 LSTM
 
 Fully Connected
 
 Softmax
 
 BasicMath
 
 Data Conversion
 

Functions

void arm_nn_depthwise_conv1d_k3_nhwc_f32 (const float32_t *__RESTRICT x_nhwc, int32_t in_c, int32_t in_w, const float32_t *__RESTRICT kernel, const float32_t *__RESTRICT b, float32_t *__RESTRICT out, int32_t out_w)
 Specialized NHWC depthwise 1D kernel for k=3, ch_mult=1 (float32).
 
void arm_nn_depthwise_conv3x3_nhwc_f32 (const float32_t *__RESTRICT x_nhwc, int32_t batches, int32_t in_c, int32_t in_h, int32_t in_w, const float32_t *__RESTRICT kernel, const float32_t *__RESTRICT b, float32_t *__RESTRICT out, int32_t stride_x, int32_t stride_y, int32_t pad_x, int32_t pad_y, int32_t out_h, int32_t out_w, float32_t act_min, float32_t act_max)
 Specialized NHWC depthwise 3x3 kernel (float32, ch_mult=1).
 
arm_cmsis_nn_status arm_nn_depthwise_conv_nt_t_f32 (const float32_t *__RESTRICT lhs, const float32_t *__RESTRICT rhs, const float32_t *__RESTRICT bias, float32_t *__RESTRICT out, int32_t lhs_rows, int32_t total_ch, int32_t row_x_col, int32_t out_row_stride, float32_t activation_min, float32_t activation_max)
 Generic depthwise helper with packed lhs tiles and transposed rhs layout (float32).
 
void arm_nn_conv1d_k5_nhwc_f32 (const float32_t *__RESTRICT x_nhwc, int32_t in_c, int32_t in_w, const float32_t *__RESTRICT kernel, const float32_t *__RESTRICT b, float32_t *__RESTRICT out, int32_t out_c, int32_t out_w)
 Specialized NHWC 1D convolution kernel for k=5 (float32).
 
void arm_nn_conv1d_k5_packed_f32 (const float32_t *__RESTRICT x_nhwc, int32_t in_c, int32_t in_w, const float32_t *__RESTRICT kernel_packed, const float32_t *__RESTRICT b, float32_t *__RESTRICT out, int32_t out_c, int32_t out_w)
 Specialized NHWC 1D convolution kernel for k=5 (float32, packed weights).
 
void arm_nn_conv1d_k3_nhwc_f32 (const float32_t *__RESTRICT x_nhwc, int32_t in_c, int32_t in_w, const float32_t *__RESTRICT kernel, const float32_t *__RESTRICT b, float32_t *__RESTRICT out, int32_t out_c, int32_t out_w)
 Specialized NHWC 1D convolution kernel for k=3 (float32).
 
void arm_nn_conv1d_k3_packed_f32 (const float32_t *__RESTRICT x_nhwc, int32_t in_c, int32_t in_w, const float32_t *__RESTRICT kernel_packed, const float32_t *__RESTRICT b, float32_t *__RESTRICT out, int32_t out_c, int32_t out_w)
 Specialized NHWC 1D convolution kernel for k=3 (float32, packed weights).
 
void arm_nn_maxpool1d_k3s3_nhwc_f32 (const float32_t *__RESTRICT x_nhwc, int32_t in_c, int32_t in_w, float32_t *__RESTRICT out, int32_t out_w)
 Specialized NHWC max-pool 1D kernel for k=3, s=3 (float32).
 
void arm_nn_maxpool1d_k2s2_nhwc_noclip_f32 (const float32_t *__RESTRICT x_nhwc, int32_t in_c, int32_t in_w, float32_t *__RESTRICT out, int32_t out_w)
 Specialized NHWC max-pool 1D kernel for k=2, s=2 without output clamp (float32).
 
void arm_nn_maxpool1d_k2s2_nhwc_f32 (const float32_t *__RESTRICT x_nhwc, int32_t in_c, int32_t in_w, float32_t *__RESTRICT out, int32_t out_w, float32_t act_min, float32_t act_max)
 Specialized NHWC max-pool 1D kernel for k=2, s=2 with clamp (float32).
 
arm_cmsis_nn_status arm_nn_mat_mult_nt_t_f32 (const float32_t *__RESTRICT lhs, const float32_t *__RESTRICT rhs, const float32_t *__RESTRICT bias, float32_t *__RESTRICT dst, int32_t lhs_rows, int32_t rhs_rows, int32_t rhs_cols, int32_t row_address_offset, float32_t activation_min, float32_t activation_max)
 Matrix multiply with non-transposed lhs and transposed rhs rows (float32).
 
arm_cmsis_nn_status arm_nn_mat_mult_nt_n_packed_f32 (const float32_t *__RESTRICT lhs, const float32_t *__RESTRICT rhs_packed, const float32_t *__RESTRICT bias, float32_t *__RESTRICT dst, int32_t lhs_rows, int32_t rhs_rows, int32_t rhs_cols, int32_t row_address_offset, float32_t activation_min, float32_t activation_max)
 Matrix multiply with non-transposed lhs and packed non-transposed rhs (float32).
 
void arm_nn_pack_conv_patch_f32 (const float32_t *__RESTRICT input, int32_t in_h, int32_t in_w, int32_t in_c, int32_t kernel_h, int32_t kernel_w, int32_t stride_h, int32_t stride_w, int32_t pad_h, int32_t pad_w, int32_t dilation_h, int32_t dilation_w, int32_t out_y, int32_t out_x, float32_t pad_value, float32_t *__RESTRICT patch_row)
 Pack a single convolution patch into one row of a contiguous float32 patch matrix.
 
void arm_nn_softmax_1x2_f32 (const float32_t in[2], float32_t out[2])
 Specialized softmax helper for a single float32 row of length 2.
 
void arm_nn_depthwise_conv2x5_nhwc_f16 (const float16_t *__RESTRICT x_nhwc, int32_t batches, int32_t in_c, int32_t in_w, int32_t ch_mult, const float16_t *__RESTRICT kernel, const float16_t *__RESTRICT b, float16_t *__RESTRICT out, int32_t out_w, float16_t act_min, float16_t act_max)
 Specialized NHWC depthwise 2x5 kernel (float16).
 
void arm_nn_depthwise_conv1d_k3_nhwc_f16 (const float16_t *__RESTRICT x_nhwc, int32_t in_c, int32_t in_w, const float16_t *__RESTRICT kernel, const float16_t *__RESTRICT b, float16_t *__RESTRICT out, int32_t out_w)
 Specialized NHWC depthwise 1D kernel for k=3, ch_mult=1 (float32).
 
void arm_nn_depthwise_conv3x3_nhwc_f16 (const float16_t *__RESTRICT x_nhwc, int32_t batches, int32_t in_c, int32_t in_h, int32_t in_w, const float16_t *__RESTRICT kernel, const float16_t *__RESTRICT b, float16_t *__RESTRICT out, int32_t stride_x, int32_t stride_y, int32_t pad_x, int32_t pad_y, int32_t out_h, int32_t out_w, float16_t act_min, float16_t act_max)
 Specialized NHWC depthwise 3x3 kernel (float32, ch_mult=1).
 
arm_cmsis_nn_status arm_nn_depthwise_conv_nt_t_f16 (const float16_t *__RESTRICT lhs, const float16_t *__RESTRICT rhs, const float16_t *__RESTRICT bias, float16_t *__RESTRICT out, int32_t lhs_rows, int32_t total_ch, int32_t row_x_col, int32_t out_row_stride, float16_t activation_min, float16_t activation_max)
 Generic depthwise helper with packed lhs tiles and transposed rhs layout (float32).
 
void arm_nn_conv1d_k5_nhwc_f16 (const float16_t *__RESTRICT x_nhwc, int32_t in_c, int32_t in_w, const float16_t *__RESTRICT kernel, const float16_t *__RESTRICT b, float16_t *__RESTRICT out, int32_t out_c, int32_t out_w)
 Specialized NHWC 1D convolution kernel for k=5 (float32).
 
void arm_nn_conv1d_k5_packed_f16 (const float16_t *__RESTRICT x_nhwc, int32_t in_c, int32_t in_w, const float16_t *__RESTRICT kernel_packed, const float16_t *__RESTRICT b, float16_t *__RESTRICT out, int32_t out_c, int32_t out_w)
 Specialized NHWC 1D convolution kernel for k=5 (float16, packed weights).
 
void arm_nn_conv1d_k3_nhwc_f16 (const float16_t *__RESTRICT x_nhwc, int32_t in_c, int32_t in_w, const float16_t *__RESTRICT kernel, const float16_t *__RESTRICT b, float16_t *__RESTRICT out, int32_t out_c, int32_t out_w)
 Specialized NHWC 1D convolution kernel for k=3 (float32).
 
void arm_nn_conv1d_k3_packed_f16 (const float16_t *__RESTRICT x_nhwc, int32_t in_c, int32_t in_w, const float16_t *__RESTRICT kernel_packed, const float16_t *__RESTRICT b, float16_t *__RESTRICT out, int32_t out_c, int32_t out_w)
 Specialized NHWC 1D convolution kernel for k=3 (float16, packed weights).
 
void arm_nn_maxpool1d_k3s3_nhwc_f16 (const float16_t *__RESTRICT x_nhwc, int32_t in_c, int32_t in_w, float16_t *__RESTRICT out, int32_t out_w)
 Specialized NHWC max-pool 1D kernel for k=3, s=3 (float16).
 
void arm_nn_maxpool1d_k2s2_nhwc_noclip_f16 (const float16_t *__RESTRICT x_nhwc, int32_t in_c, int32_t in_w, float16_t *__RESTRICT out, int32_t out_w)
 Specialized NHWC max-pool 1D kernel for k=2, s=2 without output clamp (float16).
 
void arm_nn_maxpool1d_k2s2_nhwc_f16 (const float16_t *__RESTRICT x_nhwc, int32_t in_c, int32_t in_w, float16_t *__RESTRICT out, int32_t out_w, float16_t act_min, float16_t act_max)
 Specialized NHWC max-pool 1D kernel for k=2, s=2 with clamp (float16).
 
arm_cmsis_nn_status arm_nn_mat_mult_nt_t_f16 (const float16_t *__RESTRICT lhs, const float16_t *__RESTRICT rhs, const float16_t *__RESTRICT bias, float16_t *__RESTRICT dst, int32_t lhs_rows, int32_t rhs_rows, int32_t rhs_cols, int32_t row_address_offset, float16_t activation_min, float16_t activation_max)
 Matrix multiply with non-transposed lhs and transposed rhs rows (float32).
 
arm_cmsis_nn_status arm_nn_mat_mult_nt_n_packed_f16 (const float16_t *__RESTRICT lhs, const float16_t *__RESTRICT rhs_packed, const float16_t *__RESTRICT bias, float16_t *__RESTRICT dst, int32_t lhs_rows, int32_t rhs_rows, int32_t rhs_cols, int32_t row_address_offset, float16_t activation_min, float16_t activation_max)
 Matrix multiply with non-transposed lhs and packed non-transposed rhs (float16).
 
arm_cmsis_nn_status arm_nn_lstm_step_f16 (const float16_t *data_in, const float16_t *hidden_in, float16_t *hidden_out, const cmsis_nn_lstm_params_f16 *params, cmsis_nn_lstm_context_f16 *buffers, const int32_t batch_offset)
 Update LSTM function for an iteration step using float16 input, output and state.
 
void arm_nn_pack_conv_patch_f16 (const float16_t *__RESTRICT input, int32_t in_h, int32_t in_w, int32_t in_c, int32_t kernel_h, int32_t kernel_w, int32_t stride_h, int32_t stride_w, int32_t pad_h, int32_t pad_w, int32_t dilation_h, int32_t dilation_w, int32_t out_y, int32_t out_x, float16_t pad_value, float16_t *__RESTRICT patch_row)
 Pack a single convolution patch into one row of a contiguous float32 patch matrix.
 
void arm_nn_softmax_1x2_f16 (const float16_t in[2], float16_t out[2])
 Specialized softmax helper for a single float32 row of length 2.
 
arm_cmsis_nn_status arm_nn_lstm_step_f32 (const float32_t *data_in, const float32_t *hidden_in, float32_t *hidden_out, const cmsis_nn_lstm_params_f32 *params, cmsis_nn_lstm_context_f32 *buffers, const int32_t batch_offset)
 Update LSTM function for an iteration step using float32 input, output and state.
 

Variables

const float32_t arm_nn_exp_poly_coeffs_f32 [8]
 Polynomial coefficients used by the float32 MVE exp approximation.
 
const float32_t arm_nn_exp2_lut256_f32 [257]
 LUT for 2^(i/256) used by the float32 LUT softmax approximation.
 
const float32_t arm_nn_tanh_lut256_f32 [257]
 LUT for tanh(x) sampled over x in [0, 4] for float32 helpers.
 
const float32_t arm_nn_exp_poly_coeffs_f16 [8]
 Polynomial coefficients used by the float16 MVE exp approximation.
 
const float32_t arm_nn_tanh_approx_coeffs_f16 [3]
 Coefficients used by the float16 tanh rational approximation.
 
const uint16_t arm_nn_exp2_lut256_f16 [257]
 Quantized binary16 LUT for 2^(i/256) used by float16 helpers.
 
const uint16_t arm_nn_tanh_lut256_f16 [257]
 Quantized binary16 LUT for tanh(x) with x in [0, 4].
 
const float32_t arm_nn_exp_poly_coeffs_f32 [8]
 Polynomial coefficients used by the float32 MVE exp approximation.
 
const float32_t arm_nn_exp2_lut256_f32 [257]
 LUT for 2^(i/256) used by the float32 LUT softmax approximation.
 
const float32_t arm_nn_tanh_lut256_f32 [257]
 LUT for tanh(x) sampled over x in [0, 4] for float32 helpers.
 
const float32_t arm_nn_exp_poly_coeffs_f16 [8]
 Polynomial coefficients used by the float16 MVE exp approximation.
 
const float32_t arm_nn_tanh_approx_coeffs_f16 [3]
 Coefficients used by the float16 tanh rational approximation.
 
const uint16_t arm_nn_exp2_lut256_f16 [257]
 Quantized binary16 LUT for 2^(i/256) used by float16 helpers.
 
const uint16_t arm_nn_tanh_lut256_f16 [257]
 Quantized binary16 LUT for tanh(x) with x in [0, 4].
 

Description

Internal Support functions. Not intended to be called direclty by a CMSIS-NN user.

Function Documentation

◆ arm_nn_conv1d_k3_nhwc_f16()

void arm_nn_conv1d_k3_nhwc_f16 ( const float16_t *__RESTRICT  x_nhwc,
int32_t  in_c,
int32_t  in_w,
const float16_t *__RESTRICT  kernel,
const float16_t *__RESTRICT  b,
float16_t *__RESTRICT  out,
int32_t  out_c,
int32_t  out_w 
)

Specialized NHWC 1D convolution kernel for k=3 (float32).

◆ arm_nn_conv1d_k3_nhwc_f32()

void arm_nn_conv1d_k3_nhwc_f32 ( const float32_t *__RESTRICT  x_nhwc,
int32_t  in_c,
int32_t  in_w,
const float32_t *__RESTRICT  kernel,
const float32_t *__RESTRICT  b,
float32_t *__RESTRICT  out,
int32_t  out_c,
int32_t  out_w 
)

Specialized NHWC 1D convolution kernel for k=3 (float32).

◆ arm_nn_conv1d_k3_packed_f16()

void arm_nn_conv1d_k3_packed_f16 ( const float16_t *__RESTRICT  x_nhwc,
int32_t  in_c,
int32_t  in_w,
const float16_t *__RESTRICT  kernel_packed,
const float16_t *__RESTRICT  b,
float16_t *__RESTRICT  out,
int32_t  out_c,
int32_t  out_w 
)

Specialized NHWC 1D convolution kernel for k=3 (float16, packed weights).

The packed kernel uses the same NTxN RHS layout as arm_nn_mat_mult_nt_n_packed_f16, i.e. [(3 * in_c)][out_c_block_of_8].

◆ arm_nn_conv1d_k3_packed_f32()

void arm_nn_conv1d_k3_packed_f32 ( const float32_t *__RESTRICT  x_nhwc,
int32_t  in_c,
int32_t  in_w,
const float32_t *__RESTRICT  kernel_packed,
const float32_t *__RESTRICT  b,
float32_t *__RESTRICT  out,
int32_t  out_c,
int32_t  out_w 
)

Specialized NHWC 1D convolution kernel for k=3 (float32, packed weights).

The packed kernel uses the same NTxN RHS layout as arm_nn_mat_mult_nt_n_packed_f32, i.e. [(3 * in_c)][out_c_block_of_4].

◆ arm_nn_conv1d_k5_nhwc_f16()

void arm_nn_conv1d_k5_nhwc_f16 ( const float16_t *__RESTRICT  x_nhwc,
int32_t  in_c,
int32_t  in_w,
const float16_t *__RESTRICT  kernel,
const float16_t *__RESTRICT  b,
float16_t *__RESTRICT  out,
int32_t  out_c,
int32_t  out_w 
)

Specialized NHWC 1D convolution kernel for k=5 (float32).

◆ arm_nn_conv1d_k5_nhwc_f32()

void arm_nn_conv1d_k5_nhwc_f32 ( const float32_t *__RESTRICT  x_nhwc,
int32_t  in_c,
int32_t  in_w,
const float32_t *__RESTRICT  kernel,
const float32_t *__RESTRICT  b,
float32_t *__RESTRICT  out,
int32_t  out_c,
int32_t  out_w 
)

Specialized NHWC 1D convolution kernel for k=5 (float32).

◆ arm_nn_conv1d_k5_packed_f16()

void arm_nn_conv1d_k5_packed_f16 ( const float16_t *__RESTRICT  x_nhwc,
int32_t  in_c,
int32_t  in_w,
const float16_t *__RESTRICT  kernel_packed,
const float16_t *__RESTRICT  b,
float16_t *__RESTRICT  out,
int32_t  out_c,
int32_t  out_w 
)

Specialized NHWC 1D convolution kernel for k=5 (float16, packed weights).

The packed kernel uses the same NTxN RHS layout as arm_nn_mat_mult_nt_n_packed_f16, i.e. [(5 * in_c)][out_c_block_of_8].

◆ arm_nn_conv1d_k5_packed_f32()

void arm_nn_conv1d_k5_packed_f32 ( const float32_t *__RESTRICT  x_nhwc,
int32_t  in_c,
int32_t  in_w,
const float32_t *__RESTRICT  kernel_packed,
const float32_t *__RESTRICT  b,
float32_t *__RESTRICT  out,
int32_t  out_c,
int32_t  out_w 
)

Specialized NHWC 1D convolution kernel for k=5 (float32, packed weights).

The packed kernel uses the same NTxN RHS layout as arm_nn_mat_mult_nt_n_packed_f32, i.e. [(5 * in_c)][out_c_block_of_4].

◆ arm_nn_depthwise_conv1d_k3_nhwc_f16()

void arm_nn_depthwise_conv1d_k3_nhwc_f16 ( const float16_t *__RESTRICT  x_nhwc,
int32_t  in_c,
int32_t  in_w,
const float16_t *__RESTRICT  kernel,
const float16_t *__RESTRICT  b,
float16_t *__RESTRICT  out,
int32_t  out_w 
)

Specialized NHWC depthwise 1D kernel for k=3, ch_mult=1 (float32).

◆ arm_nn_depthwise_conv1d_k3_nhwc_f32()

void arm_nn_depthwise_conv1d_k3_nhwc_f32 ( const float32_t *__RESTRICT  x_nhwc,
int32_t  in_c,
int32_t  in_w,
const float32_t *__RESTRICT  kernel,
const float32_t *__RESTRICT  b,
float32_t *__RESTRICT  out,
int32_t  out_w 
)

Specialized NHWC depthwise 1D kernel for k=3, ch_mult=1 (float32).

◆ arm_nn_depthwise_conv2x5_nhwc_f16()

void arm_nn_depthwise_conv2x5_nhwc_f16 ( const float16_t *__RESTRICT  x_nhwc,
int32_t  batches,
int32_t  in_c,
int32_t  in_w,
int32_t  ch_mult,
const float16_t *__RESTRICT  kernel,
const float16_t *__RESTRICT  b,
float16_t *__RESTRICT  out,
int32_t  out_w,
float16_t  act_min,
float16_t  act_max 
)

Specialized NHWC depthwise 2x5 kernel (float16).

◆ arm_nn_depthwise_conv3x3_nhwc_f16()

void arm_nn_depthwise_conv3x3_nhwc_f16 ( const float16_t *__RESTRICT  x_nhwc,
int32_t  batches,
int32_t  in_c,
int32_t  in_h,
int32_t  in_w,
const float16_t *__RESTRICT  kernel,
const float16_t *__RESTRICT  b,
float16_t *__RESTRICT  out,
int32_t  stride_x,
int32_t  stride_y,
int32_t  pad_x,
int32_t  pad_y,
int32_t  out_h,
int32_t  out_w,
float16_t  act_min,
float16_t  act_max 
)

Specialized NHWC depthwise 3x3 kernel (float32, ch_mult=1).

◆ arm_nn_depthwise_conv3x3_nhwc_f32()

void arm_nn_depthwise_conv3x3_nhwc_f32 ( const float32_t *__RESTRICT  x_nhwc,
int32_t  batches,
int32_t  in_c,
int32_t  in_h,
int32_t  in_w,
const float32_t *__RESTRICT  kernel,
const float32_t *__RESTRICT  b,
float32_t *__RESTRICT  out,
int32_t  stride_x,
int32_t  stride_y,
int32_t  pad_x,
int32_t  pad_y,
int32_t  out_h,
int32_t  out_w,
float32_t  act_min,
float32_t  act_max 
)

Specialized NHWC depthwise 3x3 kernel (float32, ch_mult=1).

◆ arm_nn_depthwise_conv_nt_t_f16()

arm_cmsis_nn_status arm_nn_depthwise_conv_nt_t_f16 ( const float16_t *__RESTRICT  lhs,
const float16_t *__RESTRICT  rhs,
const float16_t *__RESTRICT  bias,
float16_t *__RESTRICT  out,
int32_t  lhs_rows,
int32_t  total_ch,
int32_t  row_x_col,
int32_t  out_row_stride,
float16_t  activation_min,
float16_t  activation_max 
)

Generic depthwise helper with packed lhs tiles and transposed rhs layout (float32).

◆ arm_nn_depthwise_conv_nt_t_f32()

arm_cmsis_nn_status arm_nn_depthwise_conv_nt_t_f32 ( const float32_t *__RESTRICT  lhs,
const float32_t *__RESTRICT  rhs,
const float32_t *__RESTRICT  bias,
float32_t *__RESTRICT  out,
int32_t  lhs_rows,
int32_t  total_ch,
int32_t  row_x_col,
int32_t  out_row_stride,
float32_t  activation_min,
float32_t  activation_max 
)

Generic depthwise helper with packed lhs tiles and transposed rhs layout (float32).

◆ arm_nn_lstm_step_f16()

arm_cmsis_nn_status arm_nn_lstm_step_f16 ( const float16_t *  data_in,
const float16_t *  hidden_in,
float16_t *  hidden_out,
const cmsis_nn_lstm_params_f16 params,
cmsis_nn_lstm_context_f16 buffers,
const int32_t  batch_offset 
)

Update LSTM function for an iteration step using float16 input, output and state.

Parameters
[in]data_inData input pointer.
[in]hidden_inHidden state / recurrent input pointer. May be NULL for the first step.
[out]hidden_outHidden state / recurrent output pointer.
[in]paramsStruct containing all information about the LSTM operator.
[in]buffersStruct containing pointers to mutable cell-state storage.
[in]batch_offsetNumber of timesteps between consecutive batches.
Returns
The function returns ARM_CMSIS_NN_SUCCESS.

◆ arm_nn_lstm_step_f32()

arm_cmsis_nn_status arm_nn_lstm_step_f32 ( const float32_t data_in,
const float32_t hidden_in,
float32_t hidden_out,
const cmsis_nn_lstm_params_f32 params,
cmsis_nn_lstm_context_f32 buffers,
const int32_t  batch_offset 
)

Update LSTM function for an iteration step using float32 input, output and state.

Parameters
[in]data_inData input pointer.
[in]hidden_inHidden state / recurrent input pointer. May be NULL for the first step.
[out]hidden_outHidden state / recurrent output pointer.
[in]paramsStruct containing all information about the LSTM operator.
[in]buffersStruct containing pointers to mutable cell-state storage.
[in]batch_offsetNumber of timesteps between consecutive batches.
Returns
The function returns ARM_CMSIS_NN_SUCCESS.

◆ arm_nn_mat_mult_nt_n_packed_f16()

arm_cmsis_nn_status arm_nn_mat_mult_nt_n_packed_f16 ( const float16_t *__RESTRICT  lhs,
const float16_t *__RESTRICT  rhs_packed,
const float16_t *__RESTRICT  bias,
float16_t *__RESTRICT  dst,
int32_t  lhs_rows,
int32_t  rhs_rows,
int32_t  rhs_cols,
int32_t  row_address_offset,
float16_t  activation_min,
float16_t  activation_max 
)

Matrix multiply with non-transposed lhs and packed non-transposed rhs (float16).

Parameters
[in]lhsLeft-hand matrix stored row-major with logical shape [lhs_rows, rhs_cols].
[in]rhs_packedRight-hand matrix with logical shape [rhs_cols, rhs_rows], packed in column blocks of 8. The final block uses the same packed stride and inactive tail lanes are ignored.
[in]biasOptional bias vector.
[out]dstOutput matrix.
[in]lhs_rowsNumber of rows in lhs.
[in]rhs_rowsNumber of logical output columns in the unpacked rhs matrix.
[in]rhs_colsShared reduction dimension K.
[in]row_address_offsetOutput row stride, expressed in elements.
[in]activation_minLower clamp bound.
[in]activation_maxUpper clamp bound.
Returns
ARM_CMSIS_NN_SUCCESS on success or ARM_CMSIS_NN_ARG_ERROR on invalid arguments.

◆ arm_nn_mat_mult_nt_n_packed_f32()

arm_cmsis_nn_status arm_nn_mat_mult_nt_n_packed_f32 ( const float32_t *__RESTRICT  lhs,
const float32_t *__RESTRICT  rhs_packed,
const float32_t *__RESTRICT  bias,
float32_t *__RESTRICT  dst,
int32_t  lhs_rows,
int32_t  rhs_rows,
int32_t  rhs_cols,
int32_t  row_address_offset,
float32_t  activation_min,
float32_t  activation_max 
)

Matrix multiply with non-transposed lhs and packed non-transposed rhs (float32).

Parameters
[in]lhsLeft-hand matrix stored row-major with logical shape [lhs_rows, rhs_cols].
[in]rhs_packedRight-hand matrix with logical shape [rhs_cols, rhs_rows], packed in column blocks of 4. The final block uses the same packed stride and inactive tail lanes are ignored.
[in]biasOptional bias vector.
[out]dstOutput matrix.
[in]lhs_rowsNumber of rows in lhs.
[in]rhs_rowsNumber of logical output columns in the unpacked rhs matrix.
[in]rhs_colsShared reduction dimension K.
[in]row_address_offsetOutput row stride, expressed in elements.
[in]activation_minLower clamp bound.
[in]activation_maxUpper clamp bound.
Returns
ARM_CMSIS_NN_SUCCESS on success or ARM_CMSIS_NN_ARG_ERROR on invalid arguments.

◆ arm_nn_mat_mult_nt_t_f16()

arm_cmsis_nn_status arm_nn_mat_mult_nt_t_f16 ( const float16_t *__RESTRICT  lhs,
const float16_t *__RESTRICT  rhs,
const float16_t *__RESTRICT  bias,
float16_t *__RESTRICT  dst,
int32_t  lhs_rows,
int32_t  rhs_rows,
int32_t  rhs_cols,
int32_t  row_address_offset,
float16_t  activation_min,
float16_t  activation_max 
)

Matrix multiply with non-transposed lhs and transposed rhs rows (float32).

Parameters
[in]lhsLeft-hand matrix stored row-major.
[in]rhsRight-hand matrix stored row-major, one row per output channel.
[in]biasOptional bias vector.
[out]dstOutput matrix.
[in]lhs_rowsNumber of rows in lhs.
[in]rhs_rowsNumber of rows in rhs.
[in]rhs_colsNumber of columns in rhs.
[in]row_address_offsetOutput row stride, expressed in elements.
[in]activation_minLower clamp bound.
[in]activation_maxUpper clamp bound.
Returns
ARM_CMSIS_NN_SUCCESS on success or ARM_CMSIS_NN_ARG_ERROR on invalid arguments.

◆ arm_nn_mat_mult_nt_t_f32()

arm_cmsis_nn_status arm_nn_mat_mult_nt_t_f32 ( const float32_t *__RESTRICT  lhs,
const float32_t *__RESTRICT  rhs,
const float32_t *__RESTRICT  bias,
float32_t *__RESTRICT  dst,
int32_t  lhs_rows,
int32_t  rhs_rows,
int32_t  rhs_cols,
int32_t  row_address_offset,
float32_t  activation_min,
float32_t  activation_max 
)

Matrix multiply with non-transposed lhs and transposed rhs rows (float32).

Parameters
[in]lhsLeft-hand matrix stored row-major.
[in]rhsRight-hand matrix stored row-major, one row per output channel.
[in]biasOptional bias vector.
[out]dstOutput matrix.
[in]lhs_rowsNumber of rows in lhs.
[in]rhs_rowsNumber of rows in rhs.
[in]rhs_colsNumber of columns in rhs.
[in]row_address_offsetOutput row stride, expressed in elements.
[in]activation_minLower clamp bound.
[in]activation_maxUpper clamp bound.
Returns
ARM_CMSIS_NN_SUCCESS on success or ARM_CMSIS_NN_ARG_ERROR on invalid arguments.

◆ arm_nn_maxpool1d_k2s2_nhwc_f16()

void arm_nn_maxpool1d_k2s2_nhwc_f16 ( const float16_t *__RESTRICT  x_nhwc,
int32_t  in_c,
int32_t  in_w,
float16_t *__RESTRICT  out,
int32_t  out_w,
float16_t  act_min,
float16_t  act_max 
)

Specialized NHWC max-pool 1D kernel for k=2, s=2 with clamp (float16).

◆ arm_nn_maxpool1d_k2s2_nhwc_f32()

void arm_nn_maxpool1d_k2s2_nhwc_f32 ( const float32_t *__RESTRICT  x_nhwc,
int32_t  in_c,
int32_t  in_w,
float32_t *__RESTRICT  out,
int32_t  out_w,
float32_t  act_min,
float32_t  act_max 
)

Specialized NHWC max-pool 1D kernel for k=2, s=2 with clamp (float32).

◆ arm_nn_maxpool1d_k2s2_nhwc_noclip_f16()

void arm_nn_maxpool1d_k2s2_nhwc_noclip_f16 ( const float16_t *__RESTRICT  x_nhwc,
int32_t  in_c,
int32_t  in_w,
float16_t *__RESTRICT  out,
int32_t  out_w 
)

Specialized NHWC max-pool 1D kernel for k=2, s=2 without output clamp (float16).

◆ arm_nn_maxpool1d_k2s2_nhwc_noclip_f32()

void arm_nn_maxpool1d_k2s2_nhwc_noclip_f32 ( const float32_t *__RESTRICT  x_nhwc,
int32_t  in_c,
int32_t  in_w,
float32_t *__RESTRICT  out,
int32_t  out_w 
)

Specialized NHWC max-pool 1D kernel for k=2, s=2 without output clamp (float32).

◆ arm_nn_maxpool1d_k3s3_nhwc_f16()

void arm_nn_maxpool1d_k3s3_nhwc_f16 ( const float16_t *__RESTRICT  x_nhwc,
int32_t  in_c,
int32_t  in_w,
float16_t *__RESTRICT  out,
int32_t  out_w 
)

Specialized NHWC max-pool 1D kernel for k=3, s=3 (float16).

◆ arm_nn_maxpool1d_k3s3_nhwc_f32()

void arm_nn_maxpool1d_k3s3_nhwc_f32 ( const float32_t *__RESTRICT  x_nhwc,
int32_t  in_c,
int32_t  in_w,
float32_t *__RESTRICT  out,
int32_t  out_w 
)

Specialized NHWC max-pool 1D kernel for k=3, s=3 (float32).

◆ arm_nn_pack_conv_patch_f16()

void arm_nn_pack_conv_patch_f16 ( const float16_t *__RESTRICT  input,
int32_t  in_h,
int32_t  in_w,
int32_t  in_c,
int32_t  kernel_h,
int32_t  kernel_w,
int32_t  stride_h,
int32_t  stride_w,
int32_t  pad_h,
int32_t  pad_w,
int32_t  dilation_h,
int32_t  dilation_w,
int32_t  out_y,
int32_t  out_x,
float16_t  pad_value,
float16_t *__RESTRICT  patch_row 
)

Pack a single convolution patch into one row of a contiguous float32 patch matrix.

Developers familiar with im2row/im2col terminology can think of this as packing one output patch into one row.

◆ arm_nn_pack_conv_patch_f32()

void arm_nn_pack_conv_patch_f32 ( const float32_t *__RESTRICT  input,
int32_t  in_h,
int32_t  in_w,
int32_t  in_c,
int32_t  kernel_h,
int32_t  kernel_w,
int32_t  stride_h,
int32_t  stride_w,
int32_t  pad_h,
int32_t  pad_w,
int32_t  dilation_h,
int32_t  dilation_w,
int32_t  out_y,
int32_t  out_x,
float32_t  pad_value,
float32_t *__RESTRICT  patch_row 
)

Pack a single convolution patch into one row of a contiguous float32 patch matrix.

Developers familiar with im2row/im2col terminology can think of this as packing one output patch into one row.

◆ arm_nn_softmax_1x2_f16()

void arm_nn_softmax_1x2_f16 ( const float16_t  in[2],
float16_t  out[2] 
)

Specialized softmax helper for a single float32 row of length 2.

◆ arm_nn_softmax_1x2_f32()

void arm_nn_softmax_1x2_f32 ( const float32_t  in[2],
float32_t  out[2] 
)

Specialized softmax helper for a single float32 row of length 2.

Variable Documentation

◆ arm_nn_exp2_lut256_f16 [1/2]

const uint16_t arm_nn_exp2_lut256_f16[257]
extern

Quantized binary16 LUT for 2^(i/256) used by float16 helpers.

Stores 257 samples for i = 0..256 so interpolation can safely read lut[idx + 1] while indexing the 256 fractional segments.

◆ arm_nn_exp2_lut256_f16 [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x3F75u, 0x3F7Au, 0x3F7Fu, 0x3F84u,
0x3F8Au, 0x3F8Fu, 0x3F94u, 0x3F99u, 0x3F9Fu, 0x3FA4u, 0x3FA9u, 0x3FAEu, 0x3FB4u, 0x3FB9u, 0x3FBFu, 0x3FC4u, 0x3FC9u,
0x3FCFu, 0x3FD4u, 0x3FDAu, 0x3FDFu, 0x3FE4u, 0x3FEAu, 0x3FEFu, 0x3FF5u, 0x3FFAu, 0x4000u,
}

Quantized binary16 LUT for 2^(i/256) used by float16 helpers.

Stores 257 samples for i = 0..256 so interpolation can safely read lut[idx + 1] while indexing the 256 fractional segments.

◆ arm_nn_exp2_lut256_f32 [1/2]

const float32_t arm_nn_exp2_lut256_f32[257]
extern

LUT for 2^(i/256) used by the float32 LUT softmax approximation.

Stores 257 samples for i = 0..256 so interpolation can safely read lut[idx + 1] while indexing the 256 fractional segments.

◆ arm_nn_exp2_lut256_f32 [2/2]

const float32_t arm_nn_exp2_lut256_f32[257]

LUT for 2^(i/256) used by the float32 LUT softmax approximation.

Stores 257 samples for i = 0..256 so interpolation can safely read lut[idx + 1] while indexing the 256 fractional segments.

◆ arm_nn_exp_poly_coeffs_f16 [1/2]

const float32_t arm_nn_exp_poly_coeffs_f16[8]
extern

Polynomial coefficients used by the float16 MVE exp approximation.

The float16 MVE helper evaluates the polynomial in widened float32 lanes, but it uses a dedicated coefficient table to keep the float16 path isolated from the float32 feature gate and softmax support stack.

◆ arm_nn_exp_poly_coeffs_f16 [2/2]

const float32_t arm_nn_exp_poly_coeffs_f16[8]
Initial value:
= {
1.0f,
0.0416598916054f,
0.500000596046f,
0.0014122662833f,
1.00000011921f,
0.00833693705499f,
0.166665703058f,
0.000195780929062f,
}

Polynomial coefficients used by the float16 MVE exp approximation.

The float16 MVE helper evaluates the polynomial in widened float32 lanes, but it uses a dedicated coefficient table to keep the float16 path isolated from the float32 feature gate and softmax support stack.

◆ arm_nn_exp_poly_coeffs_f32 [1/2]

const float32_t arm_nn_exp_poly_coeffs_f32[8]
extern

Polynomial coefficients used by the float32 MVE exp approximation.

◆ arm_nn_exp_poly_coeffs_f32 [2/2]

const float32_t arm_nn_exp_poly_coeffs_f32[8]
Initial value:
= {
1.0f,
0.0416598916054f,
0.500000596046f,
0.0014122662833f,
1.00000011921f,
0.00833693705499f,
0.166665703058f,
0.000195780929062f,
}

Polynomial coefficients used by the float32 MVE exp approximation.

◆ arm_nn_tanh_approx_coeffs_f16 [1/2]

const float32_t arm_nn_tanh_approx_coeffs_f16[3]
extern

Coefficients used by the float16 tanh rational approximation.

◆ arm_nn_tanh_approx_coeffs_f16 [2/2]

const float32_t arm_nn_tanh_approx_coeffs_f16[3]
Initial value:
= {
3.0f,
27.0f,
9.0f,
}

Coefficients used by the float16 tanh rational approximation.

◆ arm_nn_tanh_lut256_f16 [1/2]

const uint16_t arm_nn_tanh_lut256_f16[257]
extern

Quantized binary16 LUT for tanh(x) with x in [0, 4].

Stores 257 samples so interpolation can safely read lut[idx + 1] while indexing the 256 fractional segments across the interval.

◆ arm_nn_tanh_lut256_f16 [2/2]

const uint16_t arm_nn_tanh_lut256_f16[257]
Initial value:
= {
0x0000u, 0x2400u, 0x27FFu, 0x29FFu, 0x2BFDu, 0x2CFDu, 0x2DFCu, 0x2EF9u, 0x2FF5u, 0x3078u, 0x30F6u, 0x3172u, 0x31EEu,
0x3269u, 0x32E4u, 0x335Eu, 0x33D6u, 0x3427u, 0x3463u, 0x349Du, 0x34D8u, 0x3512u, 0x354Bu, 0x3584u, 0x35BCu, 0x35F3u,
0x362Au, 0x3660u, 0x3696u, 0x36CBu, 0x36FFu, 0x3732u, 0x3765u, 0x3797u, 0x37C8u, 0x37F9u, 0x3814u, 0x382Cu, 0x3843u,
0x3859u, 0x3870u, 0x3886u, 0x389Bu, 0x38B1u, 0x38C5u, 0x38DAu, 0x38EEu, 0x3902u, 0x3915u, 0x3928u, 0x393Au, 0x394Cu,
0x395Eu, 0x3970u, 0x3981u, 0x3991u, 0x39A2u, 0x39B2u, 0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EEu, 0x3BEFu, 0x3BEFu, 0x3BF0u, 0x3BF0u, 0x3BF1u, 0x3BF1u, 0x3BF2u,
0x3BF2u, 0x3BF3u, 0x3BF3u, 0x3BF3u, 0x3BF4u, 0x3BF4u, 0x3BF5u, 0x3BF5u, 0x3BF5u, 0x3BF6u, 0x3BF6u, 0x3BF6u, 0x3BF6u,
0x3BF7u, 0x3BF7u, 0x3BF7u, 0x3BF8u, 0x3BF8u, 0x3BF8u, 0x3BF8u, 0x3BF9u, 0x3BF9u, 0x3BF9u, 0x3BF9u, 0x3BF9u, 0x3BFAu,
0x3BFAu, 0x3BFAu, 0x3BFAu, 0x3BFAu, 0x3BFBu, 0x3BFBu, 0x3BFBu, 0x3BFBu, 0x3BFBu, 0x3BFBu, 0x3BFBu, 0x3BFCu, 0x3BFCu,
0x3BFCu, 0x3BFCu, 0x3BFCu, 0x3BFCu, 0x3BFCu, 0x3BFCu, 0x3BFDu, 0x3BFDu, 0x3BFDu, 0x3BFDu, 0x3BFDu, 0x3BFDu, 0x3BFDu,
0x3BFDu, 0x3BFDu, 0x3BFDu, 0x3BFEu, 0x3BFEu, 0x3BFEu, 0x3BFEu, 0x3BFEu, 0x3BFEu, 0x3BFEu, 0x3BFEu, 0x3BFEu, 0x3BFEu,
0x3BFEu, 0x3BFEu, 0x3BFEu, 0x3BFEu, 0x3BFEu, 0x3BFEu, 0x3BFEu, 0x3BFFu, 0x3BFFu, 0x3BFFu,
}

Quantized binary16 LUT for tanh(x) with x in [0, 4].

Stores 257 samples so interpolation can safely read lut[idx + 1] while indexing the 256 fractional segments across the interval.

◆ arm_nn_tanh_lut256_f32 [1/2]

const float32_t arm_nn_tanh_lut256_f32[257]
extern

LUT for tanh(x) sampled over x in [0, 4] for float32 helpers.

Stores 257 samples so interpolation can safely read lut[idx + 1] while indexing the 256 fractional segments across the interval.

◆ arm_nn_tanh_lut256_f32 [2/2]

const float32_t arm_nn_tanh_lut256_f32[257]

LUT for tanh(x) sampled over x in [0, 4] for float32 helpers.

Stores 257 samples so interpolation can safely read lut[idx + 1] while indexing the 256 fractional segments across the interval.