DSP库中函数arm_mat_mult_q15和arm_mat_mult_fast_q15使用注意事项
问题:举例:
q15_t pDataA2 = {1, 1, 2, 2, 3, 3, 4, 4, 5};
q15_t pDataB2 = {1, 1, 2, 2, 3, 3, 4, 4, 5};
q15_t pDataDst2;
arm_matrix_instance_q15 pSrcA2; //3行3列数据
arm_matrix_instance_q15 pSrcB2; //3行3列数据
arm_matrix_instance_q15 pDst2;
q15_t pState;
pSrcA2.numCols = 3;
pSrcA2.numRows = 3;
pSrcA2.pData = pDataA2;
pSrcB2.numCols = 3;
pSrcB2.numRows = 3;
pSrcB2.pData = pDataB2;
pDst2.numCols = 3;
pDst2.numRows = 3;
pDst2.pData = pDataDst2;
printf("****定点数Q15******************************************\r\n");
arm_mat_mult_q15(&pSrcA2, &pSrcB2, &pDst2, pState);
arm_mat_mult_fast_q15(&pSrcA2, &pSrcB2, &pDst2, pState);
for(i = 0; i < 9; i++)
{
printf("pDataDst2[%d] = %d\r\n", i, pDataDst2);
}
页:
[1]