| CMSIS-DSP Verison 1.1.0 CMSIS DSP Software Library

- CMSIS
- CORE
- DSP
- RTOS API
- SVD

- Main Page
- Reference

Dot Product Example
Examples

Description:

  Demonstrates the use of the Multiply and Add functions to perform the dot product. The dot product of two vectors is obtained by multiplying corresponding elements and summing the products.

Algorithm:

  The two input vectors `A` and `B` with length `n`, are multiplied element-by-element and then added to obtain dot product.

  This is denoted by the following equation:

        dotProduct = A[0] * B[0] + A[1] * B[1] + ... + A[n-1] * B[n-1]

Block Diagram:

Variables Description:

  - `srcA_buf_f32` points to first input vector
  - `srcB_buf_f32` points to second input vector
  - `testOutput` stores dot product of the two input vectors.

CMSIS DSP Software Library Functions Used:

  - arm_mult_f32()
  - arm_add_f32()

Refer arm_dotproduct_example_f32.c