Exemplo n.º 1
0
        //constexpr std::size_t capacity() const noexcept { return m_list.capacity() - 1; }
        //constexpr bool empty() const noexcept { return (m_end == &m_list[1]); }

        public void push(pqentry_t <detail.net_t, netlist_time> e)
        {
            /* Lock */
            lock (m_lock)                                                                                 //lock_guard_type lck(m_lock);
            {
                int iIdx = m_endIdx;                                                                      //T * i(m_end);
                for (; pqentry_t <detail.net_t, netlist_time> .QueueOp.less(m_list[iIdx - 1], e); --iIdx) //for (; QueueOp::less(*(i - 1), e); --i)
                {
                    // handled in the insert below
                    //*(i) = std::move(*(i-1));

                    //throw new emu_unimplemented();
#if false
                    m_prof_sortmove.inc();
#endif
                }

                m_list.Insert(iIdx, e);  //*i = std::move(e);
                ++m_endIdx;

                //throw new emu_unimplemented();
#if false
                m_prof_call.inc();
#endif
            }
        }
Exemplo n.º 2
0
            }                                                                                                                                   //{ return lhs.m_object == rhs.m_object; }

            public static bool equal(pqentry_t <Element, Time> lhs, Element rhs)
            {
                return(lhs.m_object.Equals(rhs));
            }                                                                                                         //{ return lhs.m_object == rhs; }
Exemplo n.º 3
0
 static bool lessequal(pqentry_t <Element, Time> lhs, pqentry_t <Element, Time> rhs)
 {
     return(lhs.m_exec_time <= rhs.m_exec_time);
 }
Exemplo n.º 4
0
 public static bool less(pqentry_t <Element, Time> lhs, pqentry_t <Element, Time> rhs)
 {
     return(lhs.m_exec_time < rhs.m_exec_time);
 }