Macro
SEQAN_OMP_PRAGMA
Portable conditional #pragma issuing if OpenMP is enabled.
SEQAN_OMP_PRAGMA(x)
Parameters
x
The string to issue behind #pragma omp.
Remarks
This macro uses portable pragma generation, dependent on the macro _OPENMP being defined (as by the OpenMP standard).
This is useful for disabling OpenMP pragmas on compilers that do not support OpenMP to suppress warnings.
Examples
Parallelize loop with OpenMP if OpenMP is enabled:
SEQAN_OMP_PRAGMA(parallel for) // becomes: #pragma omp parallel for
for (int i = 0; i < x; ++i) {
    // Do work.
}
Make an addition atomic if OpenMP is enabled:
SEQAN_OMP_PRAGMA(parallel atomic) // becomes: #pragma omp parallel atomic
i += 1;
SeqAn - Sequence Analysis Library - www.seqan.de
 

Page built @2013/07/11 09:12:37