I have C++ code with OpenMP pragmas inside. I want to test this code both for multithread mode (with OpenMP) and in single thread mode (no OpenMP).
For now, to switch between modes I need to comment #pragma omp
(or at least parallel
).
What is the cleanest, or default, way to enable / disable OpenMP?
See Question&Answers more detail:os