mirror of
https://github.com/OpenMP/Examples.git
synced 2025-04-10 16:32:11 +01:00
22 lines
663 B
TeX
22 lines
663 B
TeX
\pagebreak
|
|
\section{Conditional Compilation}
|
|
\label{sec:cond_comp}
|
|
|
|
\ccppspecificstart
|
|
The following example illustrates the use of conditional compilation using the
|
|
OpenMP macro \code{\_OPENMP}. With OpenMP compilation, the \code{\_OPENMP}
|
|
macro becomes defined.
|
|
|
|
\cnexample{cond_comp}{1}
|
|
\ccppspecificend
|
|
|
|
\fortranspecificstart
|
|
The following example illustrates the use of the conditional compilation sentinel.
|
|
With OpenMP compilation, the conditional compilation sentinel \code{!\$} is recognized
|
|
and treated as two spaces. In fixed form source, statements guarded by the sentinel
|
|
must start after column 6.
|
|
|
|
\fnexample{cond_comp}{1}
|
|
\fortranspecificend
|
|
|