_OPENMP Macro Value in OpenMP 3.0In this implementation, when a program is compiled with the -xopenmp compiler option, the _OPENMP macro value is defined to be 200805, where 2008 and 05 are the year and month of the OpenMP Specification Version 3.0. See Section 2.2, p. 26, of the Specification. Example (C/C++): #include <stdio.h>
int main()
{
#ifdef _OPENMP
printf("The _OPENMP macro is defined to have the value %d\n", _OPENMP);
#else
printf("The _OPENMP macro is not defined\n");
#endif
return 0;
}
% cc -xO3 test.c
% a.out
The _OPENMP macro is not defined
% cc -xO3 -xopenmp test.c
% a.out
The _OPENMP macro is defined to have the value 200805
|
OpenMP 3.0 Features in Express 7.08
|