# Basic Math Functions for Neural Network Computation

CMSIS-NN: Basic Math Functions for Neural Network Computation

| CMSIS-NN Version 1.1.0 CMSIS NN Software Library

- Main Page
- Usage and Description
- Reference

All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Macros Groups Pages
Functions
Basic Math Functions for Neural Network Computation

## Functions

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...

## Description

Basic Math Functions for Neural Network Computation

## Function Documentation

void arm_nn_mult_q15 | ( | q15_t * | pSrcA,
|  | q15_t * | pSrcB,
|  | q15_t * | pDst,
|  | const uint16_t | out_shift,
|  | uint32_t | blockSize
| ) |  |

Parameters

  [in] | *pSrcA | pointer to the first input vector
  [in] | *pSrcB | pointer to the second input vector
  [out] | *pDst | pointer to the output vector
  [in] | out_shift | amount of right-shift for output
  [in] | blockSize | number of samples in each vector

Returns
  none.

Scaling and Overflow Behavior:

  The function uses saturating arithmetic. Results outside of the allowable Q15 range [0x8000 0x7FFF] will be saturated.

References NN_ROUND.

void arm_nn_mult_q7 | ( | q7_t * | pSrcA,
|  | q7_t * | pSrcB,
|  | q7_t * | pDst,
|  | const uint16_t | out_shift,
|  | uint32_t | blockSize
| ) |  |

Parameters

  [in] | *pSrcA | pointer to the first input vector
  [in] | *pSrcB | pointer to the second input vector
  [out] | *pDst | pointer to the output vector
  [in] | out_shift | amount of right-shift for output
  [in] | blockSize | number of samples in each vector

Returns
  none.

Scaling and Overflow Behavior:

  The function uses saturating arithmetic. Results outside of the allowable Q7 range [0x80 0x7F] will be saturated.

References NN_ROUND.