Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The following examples illustrate the use of conditional compilation using the OpenMP macro _OPENMP (Section 2.2 on page 8). With OpenMP compilation, the _OPENMP macro becomes defined.
# ifdef _OPENMP
printf_s("Compiled by an OpenMP-compliant implementation.\n");
# endif
The defined preprocessor operator allows more than one macro to be tested in a single directive.
# if defined(_OPENMP) && defined(VERBOSE)
printf_s("Compiled by an OpenMP-compliant implementation.\n");
# endif