FLASH-X
Doxygen Generated Documentation From Interface Source Code
Flashx_omp.h
Go to the documentation of this file.
1#if(0)
2 This header file has some definitions that are useful for parts of the FLASH code
3 that uses OpenMP directives. It is currently not necessary that all source files
4 with OpenMP directives include this file. However, those that make use of the macros
5 defined here need to include it.
6#endif
7
8
9#if(0)
10! If _OPENMP is defined AND indicates a version of 200505 or earlier, then we assume
11! the compiler processes omp directives but would fail on the collapse(2) clause in them.
12! We shall have COLLAPSE(2) expand to nothing in that case. That means that OpenMP 'do'
13! directives will be applied to the outer loop, which should be good enough at least in
14! the cases where it is really worth using OpenMP, i.e., in 3D setups.
15! We name the macro COLLAPSE instead of anything else just in case some compiler uses
16! a proprocessor that does not expand macros in Fortran comments and/or directives:
17! in that case, the unmodified 'COLLAPSE(2)' will be left unchanged by the preprocessor
18! to be handled as part of the OpenMP directive.
19#endif
20
21#ifdef _OPENMP
22#if _OPENMP > 200505
23#define COLLAPSE collapse
24#else
25#define COLLAPSE(x)
26#endif
27#endif