diff options
Diffstat (limited to 'src/lib/netlist/plib/pconfig.h')
-rw-r--r-- | src/lib/netlist/plib/pconfig.h | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/src/lib/netlist/plib/pconfig.h b/src/lib/netlist/plib/pconfig.h index 411b8189dd1..57540f4ba01 100644 --- a/src/lib/netlist/plib/pconfig.h +++ b/src/lib/netlist/plib/pconfig.h @@ -34,6 +34,15 @@ #endif /* + * OpenMP adds about 10% to 20% performance for analog + * netlists like kidniki. + */ + +#ifndef USE_OPENMP +#define USE_OPENMP (0) +#endif + +/* * Set this to one if you want to use aligned storage optimizations. */ @@ -95,19 +104,23 @@ #endif #endif -#ifndef PHAS_INT128 -#define PHAS_INT128 (0) -#endif - #if (PHAS_INT128) typedef __uint128_t UINT128; typedef __int128_t INT128; #endif //============================================================ -// Standard defines +// Check for OpenMP //============================================================ +#if defined(OPENMP) +#define HAS_OPENMP ( OPENMP >= 200805 ) +#elif defined(_OPENMP) +#define HAS_OPENMP ( _OPENMP >= 200805 ) +#else +#define HAS_OPENMP (0) +#endif + //============================================================ // Pointer to Member Function //============================================================ @@ -156,4 +169,15 @@ typedef __int128_t INT128; #define MEMBER_ABI #endif +//============================================================ +// WARNINGS +//============================================================ + +#if (USE_OPENMP) +#if (!(HAS_OPENMP)) +#error To use openmp compile and link with "-fopenmp" +#endif +#endif + + #endif /* PCONFIG_H_ */ |