diff options
author | Clifford Wolf <clifford@clifford.at> | 2015-10-25 19:30:49 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2015-10-25 19:30:49 +0100 |
commit | 207736b4ee0363ff6714071e64024965916eafc2 (patch) | |
tree | 31092cfab4323500bc491d8b59deee9e297730d0 /passes/cmds | |
parent | da923c198e770806a4abb749acc75fa337247920 (diff) | |
download | yosys-207736b4ee0363ff6714071e64024965916eafc2.tar.gz yosys-207736b4ee0363ff6714071e64024965916eafc2.tar.bz2 yosys-207736b4ee0363ff6714071e64024965916eafc2.zip |
Import more std:: stuff into Yosys namespace
Diffstat (limited to 'passes/cmds')
-rw-r--r-- | passes/cmds/edgetypes.cc | 6 | ||||
-rw-r--r-- | passes/cmds/plugin.cc | 2 | ||||
-rw-r--r-- | passes/cmds/qwp.cc | 20 | ||||
-rw-r--r-- | passes/cmds/scc.cc | 4 | ||||
-rw-r--r-- | passes/cmds/splitnets.cc | 4 | ||||
-rw-r--r-- | passes/cmds/stat.cc | 2 |
6 files changed, 19 insertions, 19 deletions
diff --git a/passes/cmds/edgetypes.cc b/passes/cmds/edgetypes.cc index 5f062c6e8..7b75a009f 100644 --- a/passes/cmds/edgetypes.cc +++ b/passes/cmds/edgetypes.cc @@ -52,7 +52,7 @@ struct EdgetypePass : public Pass { for (auto module : design->selected_modules()) { SigMap sigmap(module); - dict<SigBit, pool<std::tuple<IdString, IdString, int>>> bit_sources, bit_sinks; + dict<SigBit, pool<tuple<IdString, IdString, int>>> bit_sources, bit_sinks; pool<std::pair<IdString, IdString>> multibit_ports; for (auto cell : module->selected_cells()) @@ -67,9 +67,9 @@ struct EdgetypePass : public Pass { for (int i = 0; i < GetSize(sig); i++) { if (cell->output(port_name)) - bit_sources[sig[i]].insert(std::tuple<IdString, IdString, int>(cell_type, port_name, i)); + bit_sources[sig[i]].insert(tuple<IdString, IdString, int>(cell_type, port_name, i)); if (cell->input(port_name)) - bit_sinks[sig[i]].insert(std::tuple<IdString, IdString, int>(cell_type, port_name, i)); + bit_sinks[sig[i]].insert(tuple<IdString, IdString, int>(cell_type, port_name, i)); } } diff --git a/passes/cmds/plugin.cc b/passes/cmds/plugin.cc index f7c65bbde..e2d80d9bf 100644 --- a/passes/cmds/plugin.cc +++ b/passes/cmds/plugin.cc @@ -115,7 +115,7 @@ struct PluginPass : public Pass { log("\n"); int max_alias_len = 1; for (auto &it : loaded_plugin_aliases) - max_alias_len = std::max(max_alias_len, GetSize(it.first)); + max_alias_len = max(max_alias_len, GetSize(it.first)); for (auto &it : loaded_plugin_aliases) log("Alias: %-*s %s\n", max_alias_len, it.first.c_str(), it.second.c_str()); } diff --git a/passes/cmds/qwp.cc b/passes/cmds/qwp.cc index 784076c37..8ec815a72 100644 --- a/passes/cmds/qwp.cc +++ b/passes/cmds/qwp.cc @@ -342,8 +342,8 @@ struct QwpWorker double r = alt_mode ? alt_radius : radius; if (std::isfinite(v)) { - v = std::min(v, c+r); - v = std::max(v, c-r); + v = min(v, c+r); + v = max(v, c-r); } else { v = c; } @@ -524,15 +524,15 @@ struct QwpWorker if (rel_pos < 0) { node.pos = midpos + left_scale*rel_pos; if (std::isfinite(node.pos)) { - node.pos = std::min(node.pos, midpos); - node.pos = std::max(node.pos, midpos - radius); + node.pos = min(node.pos, midpos); + node.pos = max(node.pos, midpos - radius); } else node.pos = midpos - radius/2; } else { node.pos = midpos + right_scale*rel_pos; if (std::isfinite(node.pos)) { - node.pos = std::max(node.pos, midpos); - node.pos = std::min(node.pos, midpos + radius); + node.pos = max(node.pos, midpos); + node.pos = min(node.pos, midpos + radius); } else node.pos = midpos + radius/2; } @@ -666,8 +666,8 @@ struct QwpWorker double max_value = values.front(); for (auto &v : values) { - min_value = std::min(min_value, v); - max_value = std::max(max_value, v); + min_value = min(min_value, v); + max_value = max(max_value, v); } if (fabs(max_value - min_value) < 0.001) { @@ -679,8 +679,8 @@ struct QwpWorker int max_bucket_val = 0; for (auto &v : values) { - int idx = std::min(int(GetSize(buckets) * (v - min_value) / (max_value - min_value)), GetSize(buckets)-1); - max_bucket_val = std::max(max_bucket_val, ++buckets.at(idx)); + int idx = min(int(GetSize(buckets) * (v - min_value) / (max_value - min_value)), GetSize(buckets)-1); + max_bucket_val = max(max_bucket_val, ++buckets.at(idx)); } for (int i = 4; i >= 0; i--) { diff --git a/passes/cmds/scc.cc b/passes/cmds/scc.cc index 43a43b4fc..532026f26 100644 --- a/passes/cmds/scc.cc +++ b/passes/cmds/scc.cc @@ -69,10 +69,10 @@ struct SccWorker for (auto nextCell : cellToNextCell[cell]) if (cellLabels.count(nextCell) == 0) { run(nextCell, depth+1, maxDepth); - cellLabels[cell].second = std::min(cellLabels[cell].second, cellLabels[nextCell].second); + cellLabels[cell].second = min(cellLabels[cell].second, cellLabels[nextCell].second); } else if (cellsOnStack.count(nextCell) > 0 && (maxDepth < 0 || cellDepth[nextCell] + maxDepth > depth)) { - cellLabels[cell].second = std::min(cellLabels[cell].second, cellLabels[nextCell].second); + cellLabels[cell].second = min(cellLabels[cell].second, cellLabels[nextCell].second); } if (cellLabels[cell].first == cellLabels[cell].second) diff --git a/passes/cmds/splitnets.cc b/passes/cmds/splitnets.cc index 3b6ad014f..a64c48791 100644 --- a/passes/cmds/splitnets.cc +++ b/passes/cmds/splitnets.cc @@ -140,8 +140,8 @@ struct SplitnetsPass : public Pass { for (auto wire : module->wires()) if (wire->port_id != 0) { - normalized_port_factor = std::max(normalized_port_factor, wire->port_id+1); - normalized_port_factor = std::max(normalized_port_factor, GetSize(wire)+1); + normalized_port_factor = max(normalized_port_factor, wire->port_id+1); + normalized_port_factor = max(normalized_port_factor, GetSize(wire)+1); } for (auto wire : module->wires()) diff --git a/passes/cmds/stat.cc b/passes/cmds/stat.cc index ed4a04064..af56a9e20 100644 --- a/passes/cmds/stat.cc +++ b/passes/cmds/stat.cc @@ -110,7 +110,7 @@ struct statdata_t int width_a = it.second->hasPort("\\A") ? GetSize(it.second->getPort("\\A")) : 0; int width_b = it.second->hasPort("\\B") ? GetSize(it.second->getPort("\\B")) : 0; int width_y = it.second->hasPort("\\Y") ? GetSize(it.second->getPort("\\Y")) : 0; - cell_type = stringf("%s_%d", cell_type.c_str(), std::max<int>({width_a, width_b, width_y})); + cell_type = stringf("%s_%d", cell_type.c_str(), max<int>({width_a, width_b, width_y})); } else if (cell_type.in("$mux", "$pmux")) cell_type = stringf("%s_%d", cell_type.c_str(), GetSize(it.second->getPort("\\Y"))); |