mirror of
https://github.com/verilator/verilator.git
synced 2025-01-05 22:27:35 +00:00
Internals: Avoid unordered_map/set. No functional change intended.
This commit is contained in:
parent
2537431273
commit
920ed5ca3d
@ -31,8 +31,8 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <unordered_map>
|
#include <map>
|
||||||
#include <unordered_set>
|
#include <set>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <deque>
|
#include <deque>
|
||||||
@ -295,7 +295,7 @@ private:
|
|||||||
uint64_t m_timeLastDump = 0; // Last time we did a dump
|
uint64_t m_timeLastDump = 0; // Last time we did a dump
|
||||||
bool m_didSomeDump = false; // Did at least one dump (i.e.: m_timeLastDump is valid)
|
bool m_didSomeDump = false; // Did at least one dump (i.e.: m_timeLastDump is valid)
|
||||||
VerilatedContext* m_contextp = nullptr; // The context used by the traced models
|
VerilatedContext* m_contextp = nullptr; // The context used by the traced models
|
||||||
std::unordered_set<const VerilatedModel*> m_models; // The collection of models being traced
|
std::set<const VerilatedModel*> m_models; // The collection of models being traced
|
||||||
|
|
||||||
void addCallbackRecord(std::vector<CallbackRecord>& cbVec, CallbackRecord&& cbRec)
|
void addCallbackRecord(std::vector<CallbackRecord>& cbVec, CallbackRecord&& cbRec)
|
||||||
VL_MT_SAFE_EXCLUDES(m_mutex);
|
VL_MT_SAFE_EXCLUDES(m_mutex);
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <unordered_set>
|
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
@ -1402,7 +1401,7 @@ public:
|
|||||||
VlQueue<T_Key> unique_index(Func with_func) const {
|
VlQueue<T_Key> unique_index(Func with_func) const {
|
||||||
VlQueue<T_Key> out;
|
VlQueue<T_Key> out;
|
||||||
IData index = 0;
|
IData index = 0;
|
||||||
std::unordered_set<T_Value> saw;
|
std::set<T_Value> saw;
|
||||||
for (const auto& i : m_storage) {
|
for (const auto& i : m_storage) {
|
||||||
const auto i_mapped = with_func(index, i);
|
const auto i_mapped = with_func(index, i);
|
||||||
auto it = saw.find(i_mapped);
|
auto it = saw.find(i_mapped);
|
||||||
|
@ -39,7 +39,6 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <unordered_set>
|
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
@ -922,7 +921,7 @@ public:
|
|||||||
assertOneCheck();
|
assertOneCheck();
|
||||||
VpioCbList& cbObjList = s().m_cbCurrentLists[cbValueChange];
|
VpioCbList& cbObjList = s().m_cbCurrentLists[cbValueChange];
|
||||||
bool called = false;
|
bool called = false;
|
||||||
std::unordered_set<VerilatedVpioVar*> update; // set of objects to update after callbacks
|
std::set<VerilatedVpioVar*> update; // set of objects to update after callbacks
|
||||||
if (cbObjList.empty()) return called;
|
if (cbObjList.empty()) return called;
|
||||||
const auto last = std::prev(cbObjList.end()); // prevent looping over newly added elements
|
const auto last = std::prev(cbObjList.end()); // prevent looping over newly added elements
|
||||||
for (auto it = cbObjList.begin(); true;) {
|
for (auto it = cbObjList.begin(); true;) {
|
||||||
|
Loading…
Reference in New Issue
Block a user