vcd use unuordered_map
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
ed9ea90a7d
commit
4e5ab7ca26
|
|
@ -25,7 +25,7 @@
|
|||
#include "VcdReader.hh"
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <set>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "VcdParse.hh"
|
||||
#include "Debug.hh"
|
||||
|
|
@ -43,7 +43,7 @@ using std::abs;
|
|||
using std::min;
|
||||
using std::to_string;
|
||||
using std::vector;
|
||||
using std::map;
|
||||
using std::unordered_map;
|
||||
|
||||
// Transition count and high time for duty cycle for a group of pins
|
||||
// for one bit of vcd ID.
|
||||
|
|
@ -116,7 +116,7 @@ VcdCount::highTime(VcdTime time_max) const
|
|||
// VcdCount[bit]
|
||||
typedef vector<VcdCount> VcdCounts;
|
||||
// ID -> VcdCount[bit]
|
||||
typedef map<string, VcdCounts> VcdIdCountsMap;
|
||||
typedef unordered_map<string, VcdCounts> VcdIdCountsMap;
|
||||
|
||||
class VcdCountReader : public VcdReader
|
||||
{
|
||||
|
|
@ -290,7 +290,7 @@ VcdCountReader::varAppendValue(const string &id,
|
|||
VcdTime time,
|
||||
char value)
|
||||
{
|
||||
auto itr = vcd_count_map_.find(id);
|
||||
const auto &itr = vcd_count_map_.find(id);
|
||||
if (itr != vcd_count_map_.end()) {
|
||||
VcdCounts &vcd_counts = itr->second;
|
||||
if (debug_->check("read_vcd_activities", 3)) {
|
||||
|
|
@ -316,7 +316,7 @@ VcdCountReader::varAppendBusValue(const string &id,
|
|||
VcdTime time,
|
||||
int64_t bus_value)
|
||||
{
|
||||
auto itr = vcd_count_map_.find(id);
|
||||
const auto &itr = vcd_count_map_.find(id);
|
||||
if (itr != vcd_count_map_.end()) {
|
||||
VcdCounts &vcd_counts = itr->second;
|
||||
for (size_t bit_idx = 0; bit_idx < vcd_counts.size(); bit_idx++) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue