CMSIS-NN  Version 1.2.0
CMSIS NN Software Library
 All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Macros Groups Pages
arm_nnsupportfunctions.h File Reference

Data Structures

union  arm_nnword
 Union for SIMD access of Q31/Q15/Q7 types. More...
 

Macros

#define LEFT_SHIFT(_shift)
 
#define RIGHT_SHIFT(_shift)
 
#define Q31_MIN
 
#define Q31_MAX
 
#define NN_ROUND(out_shift)
 macro for adding rounding offset More...
 

Enumerations

enum  arm_nn_activation_type
 Struct for specifying activation function types. More...
 

Functions

void arm_q7_to_q15_no_shift (const q7_t *pSrc, q15_t *pDst, uint32_t blockSize)
 Converts the elements of the Q7 vector to Q15 vector without left-shift. More...
 
void arm_q7_to_q15_reordered_no_shift (const q7_t *pSrc, q15_t *pDst, uint32_t blockSize)
 Converts the elements of the Q7 vector to reordered Q15 vector without left-shift. More...
 
void arm_nn_mult_q15 (q15_t *pSrcA, q15_t *pSrcB, q15_t *pDst, const uint16_t out_shift, uint32_t blockSize)
 Q7 vector multiplication with variable output shifts. More...
 
void arm_nn_mult_q7 (q7_t *pSrcA, q7_t *pSrcB, q7_t *pDst, const uint16_t out_shift, uint32_t blockSize)
 Q7 vector multiplication with variable output shifts. More...
 
__STATIC_FORCEINLINE q31_t arm_nn_sat_doubling_high_mult (const q31_t m1, const q31_t m2)
 Saturating doubling high multiply. Result matches NEON instruction VQRDMULH. More...
 
__STATIC_FORCEINLINE q31_t arm_nn_divide_by_power_of_two (const q31_t dividend, const q31_t exponent)
 Rounding divide by power of two. More...
 

Macro Definition Documentation

#define LEFT_SHIFT (   _shift)
#define Q31_MAX
#define Q31_MIN
#define RIGHT_SHIFT (   _shift)

Enumeration Type Documentation

Enumerator
ARM_SIGMOID 

Sigmoid activation function

ARM_TANH 

Tanh activation function

Function Documentation

__STATIC_FORCEINLINE q31_t arm_nn_divide_by_power_of_two ( const q31_t  dividend,
const q31_t  exponent 
)
Parameters
[in]dividend- Dividend
[in]exponent- Divisor = power(2, exponent) Range: [0, 31]
Returns
Rounded result of division. Midpoint is rounded away from zero.

Referenced by arm_depthwise_conv_u8_basic_ver1().

__STATIC_FORCEINLINE q31_t arm_nn_sat_doubling_high_mult ( const q31_t  m1,
const q31_t  m2 
)
Parameters
[in]m1Multiplicand
[in]m2Multiplier
Returns
Result of multiplication.

References Q31_MAX, and Q31_MIN.

Referenced by arm_depthwise_conv_u8_basic_ver1().