STM32F1 CMSIS DSP Matrix Functions

Started by tha, July 20, 2021, 07:01:47 AM

Previous topic - Next topic

tha


tha



Returns

The function คืนค่าอย่างใดอย่างหนึ่ง ARM_MATH_SIZE_MISMATCH หรือ ARM_MATH_SUCCESS ขึ้นอยู่กับผลที่ออกมาของ size checking.

Scaling and Overflow Behavior:

ความแตกต่างระหว่าง the function arm_mat_mult_q15() และ fast variant นี้คือว่า the fast variant ใช้ a 32-bit มากกว่า a 64-bit accumulator. The result ของแต่ละ 1.15 x 1.15 multiplication ถูกตัดเป็น 2.30 format. intermediate results เหล่านี้ถูกสะสมใน a 32-bit register ใน 2.30 format. สุดท้าย, the accumulator ถูกทำให้อิ่มตัวและถูกแปลงเป็น a 1.15 result.

The fast version มี the same overflow behavior อย่าง the standard version แต่จัดให้มีความเที่ยงตรงที่น้อยกว่าเนื่องจากมันทิ้ง the low 16 bits ของแต่ละ multiplication result. เพื่อหลีกเลี่ยง overflows อย่างสมบูรณ์ the input signals ต้องถูก scaled down. Scale down หนึ่งของ the input matrices โดย log2(numColsA) bits เพื่อหลีกเลี่ยง overflows, เนื่องจากทั้งหมดของ numColsA additions ถูกคำนวณภายในสำหรับแต่ละ output element.

ดู arm_mat_mult_q15() สำหรับ a slower implementation ของ function นี้ซึ่งใช้ 64-bit accumulation เพื่อจัดให้มีความเที่ยงตรงที่สูงกว่า.

References __SIMD32, __SMLAD(), ARM_MATH_SIZE_MISMATCH, ARM_MATH_SUCCESS, arm_matrix_instance_q15::numCols, arm_matrix_instance_q15::numRows, arm_matrix_instance_q15::pData, and status.

tha



Returns

The function คืนค่าอย่างใดอย่างหนึ่ง ARM_MATH_SIZE_MISMATCH หรือ ARM_MATH_SUCCESS ขึ้นอยู่กับผลที่ออกมาของ size checking.

Scaling and Overflow Behavior:

ความแตกต่างระหว่าง the function arm_mat_mult_q31() และ fast variant นี้คือว่า the fast variant ใช้ a 32-bit มากกว่า a 64-bit accumulator. The result ของแต่ละ 1.31 x 1.31 multiplication ถูกตัดเป็น 2.30 format. intermediate results เหล่านี้ถูกสะสมใน a 32-bit register ใน 2.30 format. สุดท้าย, the accumulator ถูกทำให้อิ่มตัวและถูกแปลงเป็น a 1.31 result.

The fast version มี the same overflow behavior อย่าง the standard version แต่จัดให้มีความเที่ยงตรงที่น้อยกว่าเนื่องจากมันทิ้ง the low 32 bits ของแต่ละ multiplication result. เพื่อหลีกเลี่ยง overflows อย่างสมบูรณ์ the input signals ต้องถูก scaled down. Scale down หนึ่งของ the input matrices โดย log2(numColsA) bits เพื่อหลีกเลี่ยง overflows, เนื่องจากทั้งหมดของ numColsA additions ถูกคำนวณภายในสำหรับแต่ละ output element.

ดู arm_mat_mult_q31() สำหรับ a slower implementation ของ function นี้ซึ่งใช้ 64-bit accumulation เพื่อจัดให้มีความเที่ยงตรงที่สูงกว่า.

References __SMMLA(), ARM_MATH_SIZE_MISMATCH, ARM_MATH_SUCCESS, arm_matrix_instance_q31::numCols, arm_matrix_instance_q31::numRows, arm_matrix_instance_q31::pData, and status.


tha



Returns

The function คืนค่าอย่างใดอย่างหนึ่ง ARM_MATH_SIZE_MISMATCH หรือ ARM_MATH_SUCCESS ขึ้นอยู่กับผลที่ออกมาของ size checking.

Scaling and Overflow Behavior:

The function ถูกจัดให้มีใช้โดยใช้ a 64-bit internal accumulator. The input เพื่อ  the multiplications อยู่ใน 1.15 format และการคูณให้ผล a 2.30 result  The 2.30 intermediate results ถูกสะสมใน a 64-bit accumulator ใน 34.30 format. การเข้าใกล้นี้จัดให้มี 33 guard bits และไม่มีความเสี่ยงของ overflow. The 34.30 result จากนั้นถูกตัดเป็น 34.15 format โดยการทิ้ง the low 15 bits และจากนั้นถูกทำให้อิ่มตัวเป็น 1.15 format.   
                                                           
อ้างอิงถึง arm_mat_mult_fast_q15() สำหรับ a faster แต่ less precise version ของ function นี้สำหรับ Cortex-M3 and Cortex-M4.

References __SIMD32, __SMLALD(), ARM_MATH_SIZE_MISMATCH, ARM_MATH_SUCCESS, arm_matrix_instance_q15::numCols, arm_matrix_instance_q15::numRows, arm_matrix_instance_q15::pData, and status.

tha



Returns

The function คืนค่าอย่างใดอย่างหนึ่ง ARM_MATH_SIZE_MISMATCH หรือ ARM_MATH_SUCCESS ขึ้นอยู่กับผลที่ออกมาของ size checking.

Scaling and Overflow Behavior:

The function ถูกจัดให้มีใช้โดยใช้ an internal 64-bit accumulator. The accumulator มี a 2.62 format และรักษา full precision ของ the intermediate multiplication results แต่จัดให้มีเฉพาะ a single guard bit. ไม่มี saturation บน intermediate additions. ดังนั้น, ถ้า the accumulator overflows มันจะพันรอบและบิดเบือน the result. The input signals ควรถูก scaled down เพื่อหลีกเลี่ยง intermediate overflows. The input ดังนั้นถูก scaled down โดย log2(numColsA) bits เพื่อหลีกเลี่ยง overflows, เนื่องจากทั้งหมดของ numColsA additions ถูกดำเนินการภายใน. The 2.62 accumulator ถูกเลื่อนไปทางขวาไป 31 bits และถูกทำให้อิ่มตัวเป็น 1.31 format เพื่อให้ผล the final result.

ดู arm_mat_mult_fast_q31() สำหรับ a faster แต่ less precise implementation ของ function นี้สำหรับ Cortex-M3 and Cortex-M4.

References ARM_MATH_SIZE_MISMATCH, ARM_MATH_SUCCESS, clip_q63_to_q31(), arm_matrix_instance_q31::numCols, arm_matrix_instance_q31::numRows, arm_matrix_instance_q31::pData, and status.

tha

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



Description

ไขว้ a matrix. การไขว้ an M x N matrix พลิกมันรอบเส้นทะแยงมุมตรงกลางและได้ผลใน an N x M matrix.(จาก rom เป็น column จาก column เป็น row)

                                   

tha


tha