diff options
author | couriersud <couriersud@arcor.de> | 2016-06-23 02:04:40 +0200 |
---|---|---|
committer | couriersud <couriersud@arcor.de> | 2016-06-23 02:04:51 +0200 |
commit | c6e6911aed7687b94fba52485d89f0903e102d0e (patch) | |
tree | dac88b6a6e1db607726e90bb7d7d2f5e0913ede1 /src/lib/netlist/nl_lists.h | |
parent | 224dbf1cc9fa8a6c49ee9529d3045474194667ef (diff) |
Netlist changes
- Replaced shared_ptr by unique_ptr.
- Better seperation of setup_t and netlist_t.
- Fixed bugs in rdtsc code. Refactored timer code.
- Simplify conditional activation/deactivation.
- Introduced HINT(device, hint) to clarify that hints are inheritent
and not specific to devices.
- Added improved profiling support to netlist. Statistics output now
proposes devices for which whole device activation/deactivation be
disabled. No significant improvement for pong, but breakout
experiences a 10% improvement.
- Moved options code from include to cpp file.
- Minor modifications to 7493 and 9316
- Introduced perftime_t and perfcount_t for gathering statistics. These
templates do not create any code if statistics are not kept.
- Make help2man ./nltool produce usuable output.
- More truthtable refactoring. Removed half-finished code for internal
state support. As implemented, this would have had no support for
timing delays.
[Couriersud]
Diffstat (limited to 'src/lib/netlist/nl_lists.h')
-rw-r--r-- | src/lib/netlist/nl_lists.h | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/lib/netlist/nl_lists.h b/src/lib/netlist/nl_lists.h index 475e0e285c2..9e6cc335b5b 100644 --- a/src/lib/netlist/nl_lists.h +++ b/src/lib/netlist/nl_lists.h @@ -10,10 +10,11 @@ #ifndef NLLISTS_H_ #define NLLISTS_H_ +#include <atomic> + #include "nl_config.h" #include "plib/plists.h" - -#include <atomic> +#include "plib/pchrono.h" // ---------------------------------------------------------------------------------------- @@ -36,10 +37,6 @@ namespace netlist timed_queue(unsigned list_size) : m_list(list_size) -#if (NL_KEEP_STATISTICS) - , m_prof_sortmove(0) - , m_prof_call(0) -#endif { #if HAS_OPENMP && USE_OPENMP m_lock = 0; @@ -60,11 +57,11 @@ namespace netlist for (; t > (i - 1)->m_exec_time; --i) { *(i) = *(i-1); - inc_stat(m_prof_sortmove); + m_prof_sortmove.inc(); } *i = { t, o }; ++m_end; - inc_stat(m_prof_call); + m_prof_call.inc(); #if HAS_OPENMP && USE_OPENMP m_lock = 0; #endif @@ -132,12 +129,9 @@ namespace netlist std::vector<entry_t> m_list; public: - #if (NL_KEEP_STATISTICS) // profiling - std::size_t m_prof_sortmove; - std::size_t m_prof_call; - #endif - + nperfcount_t m_prof_sortmove; + nperfcount_t m_prof_call; }; } |