vec_cx_mpy_04.c

来自「dsp6713开发板的许多例程.对入门特别有用」· C语言 代码 · 共 14 行

C
14
字号
void vec_cx_mpy(const short *restrict a, const short *restrict b,              short *restrict c){    int j;     for (i = j = 0; i < len; i++, j += 2)    {        /* Real components are at odd offsets, and imaginary components           are at even offsets within each array. */        c[j+1] = (a[j+1] * b[j+1] - a[j+0] * b[j+0]) >> 16;        c[j+0] = (a[j+1] * b[j+0] + a[j+0] * b[j+1]) >> 16;    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?