在6678平台下使用openmp有以下疑问,
如图是CCS创建的例程
1、若想运行在8个核中,8个核是否要记载相同的该程序?
2、若8个核都加载该程序,是不是意味着8个核都执行了omp_set_num_threads(NTHREADS);语句?
3、如要openmp中串行代码各核代码有不同之处,是否是用DNUM区分各核应该执行的代码?
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.
1、是的,8个核都需要加载该程序。
参考链接:
downloads.ti.com/.../building_openmp_app.html
It is critical to load the application on all cores before running the application on any core
2、只有主核才会执行,根据上面贴出的链接内容来看,master core ID是可以设置的。
OpenMP.masterCoreIdx = 0;
附件的文档资料也参考看一下。