Commit 4ca8c22c authored by Gilles Caulier's avatar Gilles Caulier 🗼
Browse files

add a flag to compile libpgf without openmp support at compilation time.

Raphael, please add this patch to current libpgf implementation
CCMAIL: rschweizer@schweizer-informatik.ch
CCBUGS: 273765
parent e93f7ad7
......@@ -608,26 +608,32 @@ __inline UINT64 ByteSwap(UINT64 ui64) {
#endif //PGF_USE_BIG_ENDIAN
// NOTE: Use LIBPGF_DISABLE_OPENMP to disable OpenMP support in whole libpgf
#if not defined (LIBPGF_DISABLE_OPENMP)
// OpenMP rules (inspired from libraw project)
#if defined (_OPENMP)
#if defined(WIN32)
# if defined (_MSC_VER) && (_MSC_VER >= 1500)
/* VS2008 SP1 and VS2010+ : OpenMP works OK */
// VS2008 SP1 and VS2010+ : OpenMP works OK
# define LIBPGF_USE_OPENMP
#elif defined (__INTEL_COMPILER) && (__INTEL_COMPILER >=910)
/* Have not tested on 9.x and 10.x, but Intel documentation claims OpenMP 2.5 support in 9.1 */
// Have not tested on 9.x and 10.x, but Intel documentation claims OpenMP 2.5 support in 9.1
# define LIBPGF_USE_OPENMP
#else
# undef LIBPGF_USE_OPENMP
#endif
/* Not Win32 */
// Not Win32
# elif (defined(__APPLE__) || defined(__MACOSX__)) && defined(_REENTRANT)
# undef LIBPGF_USE_OPENMP
# else
# define LIBPGF_USE_OPENMP
# endif
#endif
#endif // defined (_OPENMP)
#endif // not defined (LIBPGF_DISABLE_OPENMP)
#ifdef LIBPGF_USE_OPENMP
#include <omp.h>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment