OpenMP set_num_threads() is not working

前端 未结 5 1232
说谎
说谎 2020-11-30 01:01

I am writing a parallel program using OpenMP in C++.

I want to control the number of threads in the program using omp_set_num_threads(), but it does not

5条回答
  •  暖寄归人
    2020-11-30 01:51

    I was facing the same problem . Solution is given below

    Right click on Source Program > Properties > Configuration Properties > C/C++ > Language > Now change Open MP support flag to Yes....

    You will get the desired result.

提交回复
热议问题