mirror of
https://github.com/holub/mame
synced 2025-05-28 16:43:04 +03:00
More simplification.
This commit is contained in:
parent
96be861b16
commit
61110b72c1
@ -19,7 +19,7 @@ namespace netlist
|
||||
{
|
||||
|
||||
#if (NL_USE_MEMPOOL)
|
||||
static plib::pmempool p(65536, 16);
|
||||
static plib::mempool p(65536, 8);
|
||||
|
||||
void * object_t::operator new (size_t size)
|
||||
{
|
||||
@ -146,7 +146,7 @@ void queue_t::on_post_load()
|
||||
net_t *n = netlist().find_net(m_names[i].m_buf);
|
||||
//log().debug("Got {1} ==> {2}\n", qtemp[i].m_name, n));
|
||||
//log().debug("schedule time {1} ({2})\n", n->time().as_double(), netlist_time::from_raw(m_times[i]).as_double()));
|
||||
this->push({ netlist_time::from_raw(m_times[i]), n });
|
||||
this->push(netlist_time::from_raw(m_times[i]), n);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1341,7 +1341,7 @@ protected:
|
||||
|
||||
ATTR_HOT inline void netlist_t::push_to_queue(net_t &out, const netlist_time &attime) NOEXCEPT
|
||||
{
|
||||
m_queue.push({ attime, &out });
|
||||
m_queue.push(attime, &out);
|
||||
}
|
||||
|
||||
ATTR_HOT inline void netlist_t::remove_from_queue(net_t &out)
|
||||
@ -1349,30 +1349,10 @@ protected:
|
||||
m_queue.remove(&out);
|
||||
}
|
||||
|
||||
#if 1
|
||||
ATTR_HOT inline void core_device_t::OUTLOGIC(logic_output_t &out, const netlist_sig_t val, const netlist_time &delay) NOEXCEPT
|
||||
{
|
||||
out.set_Q(val, delay);
|
||||
}
|
||||
#else
|
||||
ATTR_HOT inline void core_device_t::OUTLOGIC(logic_output_t &out, const netlist_sig_t val, const netlist_time &delay) NOEXCEPT
|
||||
{
|
||||
logic_net_t &net = out.m_my_net;
|
||||
if (val != net.m_new_Q)
|
||||
{
|
||||
net.m_new_Q = val;
|
||||
if (!net.is_queued() && (net.num_cons() > 0))
|
||||
{
|
||||
net.m_time = netlist().time() + delay;
|
||||
net.m_in_queue = (net.m_active > 0); /* queued ? */
|
||||
if (net.m_in_queue)
|
||||
{
|
||||
netlist().push_to_queue(net, net.m_time);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
|
@ -46,13 +46,12 @@ namespace netlist
|
||||
ATTR_HOT std::size_t capacity() const { return m_list.size(); }
|
||||
ATTR_HOT bool empty() const { return (m_end == &m_list[1]); }
|
||||
|
||||
ATTR_HOT void push(const entry_t e) NOEXCEPT
|
||||
ATTR_HOT void push(const Time t, Element o) NOEXCEPT
|
||||
{
|
||||
#if HAS_OPENMP && USE_OPENMP
|
||||
/* Lock */
|
||||
while (m_lock.exchange(1)) { }
|
||||
#endif
|
||||
const Time t = e.m_exec_time;
|
||||
entry_t * i = m_end++;
|
||||
for (; t > (i - 1)->m_exec_time; --i)
|
||||
{
|
||||
@ -60,7 +59,7 @@ namespace netlist
|
||||
//i--;
|
||||
inc_stat(m_prof_sortmove);
|
||||
}
|
||||
*i = e;
|
||||
*i = { t, o };
|
||||
inc_stat(m_prof_call);
|
||||
#if HAS_OPENMP && USE_OPENMP
|
||||
m_lock = 0;
|
||||
@ -85,7 +84,7 @@ namespace netlist
|
||||
while (i < m_end)
|
||||
{
|
||||
*i = *(i+1);
|
||||
i++;
|
||||
++i;
|
||||
}
|
||||
#if HAS_OPENMP && USE_OPENMP
|
||||
m_lock = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user