Skip to content

Commit

Permalink
fix tm option for master
Browse files Browse the repository at this point in the history
  • Loading branch information
khata1007 committed Apr 16, 2023
1 parent 674af17 commit 0709974
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions src/core/symbolic_simulate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,19 +114,22 @@ void output_result(Simulator &ss, Opts &opts) {
writer.write(*simulator_, of_name, input_file_name + "_diff");
}

if (cmdline_options.get<std::vector<string>>("tm").at(0) == "s") {
hydla::io::StdProfilePrinter().print_profile(ss.get_profile());
} else if (cmdline_options.get<std::vector<string>>("tm").at(0) == "c") {
std::string csv_name = cmdline_options.get<std::vector<string>>("tm").at(1);
if (csv_name == "") {
hydla::io::CsvProfilePrinter().print_profile(ss.get_profile());
} else {
std::ofstream ofs;
ofs.open(csv_name.c_str());
hydla::io::CsvProfilePrinter(ofs).print_profile(ss.get_profile());
ofs.close();
if (not is_master()) {
if (cmdline_options.get<std::vector<string>>("tm").at(0) == "s") {
hydla::io::StdProfilePrinter().print_profile(ss.get_profile());
} else if (cmdline_options.get<std::vector<string>>("tm").at(0) == "c") {
std::string csv_name = cmdline_options.get<std::vector<string>>("tm").at(1);
if (csv_name == "") {
hydla::io::CsvProfilePrinter().print_profile(ss.get_profile());
} else {
std::ofstream ofs;
ofs.open(csv_name.c_str());
hydla::io::CsvProfilePrinter(ofs).print_profile(ss.get_profile());
ofs.close();
}
}
}

}

void trim_front_and_behind_space(std::string &buffer) {
Expand Down

0 comments on commit 0709974

Please sign in to comment.