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.

OpenMP的中#pragma的使用



你好。我有两个问题。

1、请问我在.cfg中用XGCONF打开,设置哪里可以设置OpenMP.setNumProcessors(7);这个代码?

2、我通过手动设置,也添加了OpenMP组件及HeapOMP组件后,在程序中加入如下代码,加入了头文件#include <ti/omp/omp.h>

 #pragma omp  parallel for shared(Ompsum) private(i)
 for(i = 0; i < 7; i++)
 {
  Ompsum += 3;
  /* Get the core number. */
  coreNum = omp_get_thread_num();
  platform_write("omp cores : %d \n", coreNum);
 }

编译时提醒#163-D unrecognized #pragma main.c /SRIO_Test line 121 C/C++ Problem    请问这个怎么回事?

请指点。非常感谢!