diff options
-rw-r--r-- | src/lib/netlist/nl_base.cpp | 7 | ||||
-rw-r--r-- | src/lib/netlist/nl_config.h | 32 | ||||
-rw-r--r-- | src/lib/netlist/plib/pconfig.h | 34 |
3 files changed, 34 insertions, 39 deletions
diff --git a/src/lib/netlist/nl_base.cpp b/src/lib/netlist/nl_base.cpp index b31b7b9ad16..c23776f8219 100644 --- a/src/lib/netlist/nl_base.cpp +++ b/src/lib/netlist/nl_base.cpp @@ -473,10 +473,11 @@ void netlist_t::print_stats() const log().verbose("Total loop {1:15}", m_stat_mainloop()); log().verbose("Total time {1:15}", total_time); - /* Only one serialization should be counted in total time */ - /* But two are contained in m_stat_mainloop */ - if (!!USE_QUEUE_STATS) + // FIXME: clang complains about unreachable code without + if (USE_QUEUE_STATS || (!USE_QUEUE_STATS && m_stats)) { + /* Only one serialization should be counted in total time */ + /* But two are contained in m_stat_mainloop */ nperftime_t<true> overhead; nperftime_t<true> test; { diff --git a/src/lib/netlist/nl_config.h b/src/lib/netlist/nl_config.h index daf5ebae427..1ef79af3c07 100644 --- a/src/lib/netlist/nl_config.h +++ b/src/lib/netlist/nl_config.h @@ -75,29 +75,9 @@ #endif //============================================================ -// General Macros +// Time resolution //============================================================ -#if defined(OPENMP) -#define HAS_OPENMP ( OPENMP >= 200805 ) -#elif defined(_OPENMP) -#define HAS_OPENMP ( _OPENMP >= 200805 ) -#else -#define HAS_OPENMP (0) -#endif - -//============================================================ -// General -//============================================================ - -/* The following adds about 10% to 20% performance for analog - * netlists like kidniki. - */ - -#if !defined(USE_OPENMP) -#define USE_OPENMP (0) -#endif // !defined(USE_OPENMP) - // Use nano-second resolution - Sufficient for now static constexpr const auto NETLIST_INTERNAL_RES = 1000000000; @@ -113,14 +93,4 @@ static constexpr const auto NETLIST_CLOCK = NETLIST_INTERNAL_RES; //#define nl_double float using nl_double = double; -//============================================================ -// WARNINGS -//============================================================ - -#if (USE_OPENMP) -#if (!(HAS_OPENMP)) -#error To use openmp compile and link with "-fopenmp" -#endif -#endif - #endif /* NLCONFIG_H_ */ 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_ */ |