Commit 322283db authored by Shucai Xiao's avatar Shucai Xiao
Browse files

clang format

parent febc0d88
...@@ -418,9 +418,10 @@ static void print_title(std::ostream& os, std::size_t max_ins_len, bool print_pe ...@@ -418,9 +418,10 @@ static void print_title(std::ostream& os, std::size_t max_ins_len, bool print_pe
str.append(max_ins_len + 1 - str.length(), ' '); str.append(max_ins_len + 1 - str.length(), ' ');
str.append(1, '\t'); str.append(1, '\t');
os << str; os << str;
if (not print_percentage) titles.erase(titles.begin() + 2); if(not print_percentage)
titles.erase(titles.begin() + 2);
int i = 1; int i = 1;
for (; i < titles.size(); ++i) for(; i < titles.size(); ++i)
{ {
os << titles[i]; os << titles[i];
} }
...@@ -445,7 +446,7 @@ static void print_ins_perf(std::ostream& os, ...@@ -445,7 +446,7 @@ static void print_ins_perf(std::ostream& os,
tms.append(time_str.length() - tms.length(), ' '); tms.append(time_str.length() - tms.length(), ' ');
std::string pers; std::string pers;
if (print_percentage) if(print_percentage)
{ {
double percent = 100.0 * t / total_t; double percent = 100.0 * t / total_t;
pers = std::to_string(percent); pers = std::to_string(percent);
...@@ -557,7 +558,7 @@ std::vector<argument> program::eval(parameter_map params) const ...@@ -557,7 +558,7 @@ std::vector<argument> program::eval(parameter_map params) const
auto max_ins_len = max_ins_length(); auto max_ins_len = max_ins_length();
std::unordered_map<instruction_ref, std::string> ins_names; std::unordered_map<instruction_ref, std::string> ins_names;
this->print(ins_names, [&](auto, auto) {}); this->print(ins_names, [&](auto, auto) {});
if (trace_level == 3) if(trace_level == 3)
{ {
std::string prefix = "Run instruction: "; std::string prefix = "Run instruction: ";
max_ins_len += prefix.length(); max_ins_len += prefix.length();
...@@ -578,7 +579,7 @@ std::vector<argument> program::eval(parameter_map params) const ...@@ -578,7 +579,7 @@ std::vector<argument> program::eval(parameter_map params) const
double t1 = t.record<milliseconds>(); double t1 = t.record<milliseconds>();
ctx.finish(); ctx.finish();
double t2 = t.record<milliseconds>(); double t2 = t.record<milliseconds>();
if (trace_level < 3) if(trace_level < 3)
{ {
std::cout << ss.str() << std::endl; std::cout << ss.str() << std::endl;
std::cout << "Time: " << t1 << "ms, " << t2 std::cout << "Time: " << t1 << "ms, " << t2
...@@ -606,7 +607,7 @@ std::vector<argument> program::eval(parameter_map params) const ...@@ -606,7 +607,7 @@ std::vector<argument> program::eval(parameter_map params) const
else if(trace_level == 3) else if(trace_level == 3)
{ {
// count max instruction length // count max instruction length
if (ins->get_operator().output_alias({}) == 0) if(ins->get_operator().output_alias({}) == 0)
{ {
std::cout << ss.str() << std::endl; std::cout << ss.str() << std::endl;
return result; return result;
......
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