a[3]={15,25,24}
b[3]={12,32,13}
求c[i]=| a[i]-b[i] |,用C来调用线性汇编?谢谢
第二个问题:SUBABS4这个指令如何结合数组使用?谢谢?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
我觉得没必要写线性汇编,用TI的intrinsic写C代码就能达到和汇编一样的效率。
关于C6000优化你可以参考一下: http://www.deyisupport.com/question_answer/dsp_arm/c6000_multicore/f/53/t/19044.aspx
SUBABS4操作的是16比特整数,如果你的数据类型也是16比特整数,那么用intrinsic写成这样
for( i = 0; i< length; i+=4 )
{
a0123 = _amem8(&ptr_a[i]);
b0123 = _amem8(&ptr_b[i]);
_amem8(&ptr_c[i]) = _subabs4(a_9123,b_0123);
}