STM32F1 CMSIS DSP Basic Math Functions

Started by tha, July 13, 2021, 01:28:14 PM

Previous topic - Next topic

tha


tha

file:///D:/System%20Workbench/STM32CubeF1-master/Drivers/CMSIS/docs/DSP/html/group__offset.html



Description

บวก a constant offset ไปยังแต่ละ element of a vector.

    pDst[n] = pSrc[n] + offset,   0 <= n < blockSize.

The functions รองรับการคำนวณแบบแทนที่ยอมให้ the source and destination pointers อ้างอิงไปยัง the same memory buffer. มีฟั่งชั่นที่แยกกันสำหรับ floating-point, Q7, Q15, and Q31 data types.

tha



tha


tha


tha


tha

file:///D:/System%20Workbench/STM32CubeF1-master/Drivers/CMSIS/docs/DSP/html/group__scale.html



Description

คูณ a vector ด้วย a scalar value. สำหรับ floating-point data, the algorithm ถูกใช้ :

    pDst[n] = pSrc[n] * scale,   0 <= n < blockSize.

ใน the fixed-point Q7, Q15, and Q31 functions, scale ถูกแสดงโดย a fractional multiplication scaleFract และ an arithmetic shift shift. The shift ยอมให้ได้รับ the scaling operation ที่เกิน 1.0. The algorithm ที่ใช้กับ fixed-point data คือ:

  pDst[n] = (pSrc[n] * scaleFract) << shift,   0 <= n < blockSize.

The overall scale factor ถูกใช้กับ the fixed-point data คือ

scale = scaleFract * 2^shift.

The functions รองรับการคำนวณแบบแทนที่ยอมให้ the source and destination pointers อ้างอิงไปยัง the same memory buffer.

tha