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.

关于omp_uia_example



使用openMP自带例子,使用UIA测试周期,8核时周期是36375036;但是把同样程序

void delay(int delaylength) {

    int  i;     volatile float a=0.;

    for (i=0; i<delaylength; i++) a+=i;

}

 for (i = 0; i < NUMLOOPS; i++) {             delay(DELAYLENGTH);         }

放在另外的project(不使用openMP,单核),周期只有49000000左右,为何使用openMP效率会有这么大损耗?

是否有方法改进?