Is it necessary to include omp.h in my C/C++ sources? Why? Or why not? Does the gcc compiler include it by default when used with the -fopenmp flag? It doesn't seem te make a differance.
+3
A:
You only need it to call OMP APIs. If all you need are pragmas you don't need to include it.
bmargulies
2010-03-01 19:56:14
+2
A:
If you're using OpenMP functions in a given file, it is necessary for that file to include it. Otherwise it is not necessary.
Chuck
2010-03-01 19:57:43
+3
A:
The compiler flags (-openmp
for Intel, -fopenmp
for GCC) will not add it for you. If you need to use functions or types defined in this header, you will need to include it.
Neptune
2010-03-02 08:49:39