"doc/vscode:/vscode.git/clone" did not exist on "1c14267155ead0e95c35217b6326047ef3344784"
Commit bb3a1061 authored by Paul's avatar Paul
Browse files

Formatting

parent 5613e3a7
...@@ -23,7 +23,9 @@ struct program_impl ...@@ -23,7 +23,9 @@ struct program_impl
const operation& get_operation(instruction_ref ins) { return ins->get_operator(); } const operation& get_operation(instruction_ref ins) { return ins->get_operator(); }
static void print_instruction(std::ostream& os, instruction_ref ins, const std::unordered_map<instruction_ref, std::string>& names) static void print_instruction(std::ostream& os,
instruction_ref ins,
const std::unordered_map<instruction_ref, std::string>& names)
{ {
os << names.at(ins) << " = "; os << names.at(ins) << " = ";
...@@ -149,9 +151,9 @@ instruction_ref program::replace_instruction(instruction_ref ins, instruction_re ...@@ -149,9 +151,9 @@ instruction_ref program::replace_instruction(instruction_ref ins, instruction_re
// Replacement should not be dead code unless its the last instruction // Replacement should not be dead code unless its the last instruction
assert(!rep->outputs().empty() or rep == std::prev(end())); assert(!rep->outputs().empty() or rep == std::prev(end()));
// Output of the original instruction should only be the replacement or empty // Output of the original instruction should only be the replacement or empty
assert(ins->outputs().empty() or std::all_of(ins->outputs().begin(), ins->outputs().end(), [&](auto i) { assert(ins->outputs().empty() or std::all_of(ins->outputs().begin(),
return i == rep; ins->outputs().end(),
})); [&](auto i) { return i == rep; }));
assert(ins->valid(begin())); assert(ins->valid(begin()));
assert(rep->valid(begin())); assert(rep->valid(begin()));
return rep; return rep;
...@@ -466,10 +468,7 @@ void program::perf_report(std::ostream& os, std::size_t n, parameter_map params) ...@@ -466,10 +468,7 @@ void program::perf_report(std::ostream& os, std::size_t n, parameter_map params)
<< ", " << std::round(calculate_overhead_percent) << "%" << std::endl; << ", " << std::round(calculate_overhead_percent) << "%" << std::endl;
} }
void program::debug_print() void program::debug_print() { std::cout << *this << std::endl; }
{
std::cout << *this << std::endl;
}
void program::debug_print(instruction_ref ins) void program::debug_print(instruction_ref ins)
{ {
std::stringstream ss; std::stringstream ss;
...@@ -483,7 +482,7 @@ void program::debug_print(instruction_ref ins) ...@@ -483,7 +482,7 @@ void program::debug_print(instruction_ref ins)
} }
void program::debug_print(const std::vector<instruction_ref>& inss) void program::debug_print(const std::vector<instruction_ref>& inss)
{ {
for(auto ins:inss) for(auto ins : inss)
debug_print(ins); debug_print(ins);
std::cout << std::endl; std::cout << std::endl;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment