lesson_c.c

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

C
38
字号
/****************************************************************************//*                                                                          *//* lesson_c  -  First version                                               *//*                                                                          *//* Results for Release 4.00:                                                *//*                                                                          *//*     When compiled with -k -mw -mh -o3:                                   *//*          10 cycles per iteration - Loop Carry Path on passed pointers    *//*                                                                          *//*          Program info needed but not available:                          *//*              Potential pointer aliasing info                             *//*              Loop count info - minimum trip count                        *//*              Loop count info - max trip count factor                     *//*              Alignment info - xptr and yptr aligned on a word boundary   *//*                                                                          *//*     When compiled with -k -mw -mh -o3 -pm -op2 with tutor_d              *//*           1 cycle per iteration - All info available                     *//*                                                                          *//****************************************************************************/void lesson_c(short *xptr, short *yptr, short *zptr, short *w_sum, int N){    int i, w_vec1, w_vec2;    short w1,w2;    w1 = zptr[0];    w2 = zptr[1];    for (i = 0; i < N; i++)    {        w_vec1 =  xptr[i] * w1;        w_vec2 =  yptr[i] * w2;        w_sum[i] = (w_vec1 + w_vec2) >> 15;    }}

⌨️ 快捷键说明

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