silly
parent
b58bb4c695
commit
4420d537aa
|
@ -1,5 +1,5 @@
|
||||||
cmake_minimum_required(VERSION 3.25)
|
cmake_minimum_required(VERSION 3.25)
|
||||||
project(COSC-4P80-Assignment-1 VERSION 0.0.23)
|
project(COSC-4P80-Assignment-1 VERSION 0.0.24)
|
||||||
|
|
||||||
option(ENABLE_ADDRSAN "Enable the address sanitizer" OFF)
|
option(ENABLE_ADDRSAN "Enable the address sanitizer" OFF)
|
||||||
option(ENABLE_UBSAN "Enable the ub sanitizer" OFF)
|
option(ENABLE_UBSAN "Enable the ub sanitizer" OFF)
|
||||||
|
|
20
src/main.cpp
20
src/main.cpp
|
@ -114,12 +114,13 @@ class executor
|
||||||
std::vector<output_t> crosstalk_data;
|
std::vector<output_t> crosstalk_data;
|
||||||
crosstalk_data.resize(outputs.size());
|
crosstalk_data.resize(outputs.size());
|
||||||
|
|
||||||
|
std::cout << "\\begin{tabular}{||c|c|c|c|c||}\n\\hline\n";
|
||||||
for (auto [i, c] : blt::enumerate(crosstalk_data))
|
for (auto [i, c] : blt::enumerate(crosstalk_data))
|
||||||
{
|
{
|
||||||
if (print_latex)
|
if (print_latex)
|
||||||
{
|
{
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
std::cout << "\\hline\nInput " << i + 1 << " & & Cos & Output Vector & Crosstalk Vector \\\\\n\\hline\\hline\n";
|
std::cout << "Input " << i + 1 << " & & Cos & Output Vector & Crosstalk Vector \\\\\n\\hline\\hline\n";
|
||||||
else
|
else
|
||||||
std::cout << "Input " << i + 1 << " & & & & \\\\\n\\hline\\hline\n";
|
std::cout << "Input " << i + 1 << " & & & & \\\\\n\\hline\\hline\n";
|
||||||
}
|
}
|
||||||
|
@ -148,6 +149,7 @@ class executor
|
||||||
std::cout << "}\\\\\n\\multicolumn{5}{|c|}{Total Crosstalk: " << c.magnitude() << "} \\\\\n\\hline\\hline\n";
|
std::cout << "}\\\\\n\\multicolumn{5}{|c|}{Total Crosstalk: " << c.magnitude() << "} \\\\\n\\hline\\hline\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
std::cout << "\\end{tabular}\n";
|
||||||
|
|
||||||
return crosstalk_data;
|
return crosstalk_data;
|
||||||
}
|
}
|
||||||
|
@ -273,12 +275,12 @@ class executor
|
||||||
for (auto [i, os] : blt::enumerate(output_lines))
|
for (auto [i, os] : blt::enumerate(output_lines))
|
||||||
(os += "Output ") += std::to_string(i + 1);
|
(os += "Output ") += std::to_string(i + 1);
|
||||||
|
|
||||||
for (const auto& step : steps)
|
for (const auto& [step_idx, step] : blt::enumerate(steps))
|
||||||
{
|
{
|
||||||
for (auto [idx, pong] : blt::enumerate(step))
|
for (auto [idx, pong] : blt::enumerate(step))
|
||||||
{
|
{
|
||||||
if (!(idx == 0 || idx == step.size()-1))
|
if (!(step_idx == 0 || step_idx == steps.size()-1))
|
||||||
continue;
|
break;
|
||||||
auto& is = input_lines[idx];
|
auto& is = input_lines[idx];
|
||||||
auto& os = output_lines[idx];
|
auto& os = output_lines[idx];
|
||||||
|
|
||||||
|
@ -577,6 +579,11 @@ void part_c()
|
||||||
cute.print_execution_results();
|
cute.print_execution_results();
|
||||||
cute.print_correctness();
|
cute.print_correctness();
|
||||||
cute.print_crosstalk();
|
cute.print_crosstalk();
|
||||||
|
if (print_latex)
|
||||||
|
cute.print_execution_results_latex_no_intermediates();
|
||||||
|
cute.execute_output();
|
||||||
|
cute.print_execution_results();
|
||||||
|
cute.print_correctness();
|
||||||
if (print_latex)
|
if (print_latex)
|
||||||
cute.print_execution_results_latex_no_intermediates();
|
cute.print_execution_results_latex_no_intermediates();
|
||||||
BLT_TRACE("--- { Part C with 3 extra pairs } ---");
|
BLT_TRACE("--- { Part C with 3 extra pairs } ---");
|
||||||
|
@ -587,6 +594,11 @@ void part_c()
|
||||||
cute2.print_crosstalk();
|
cute2.print_crosstalk();
|
||||||
if (print_latex)
|
if (print_latex)
|
||||||
cute2.print_execution_results_latex_no_intermediates();
|
cute2.print_execution_results_latex_no_intermediates();
|
||||||
|
cute2.execute_output();
|
||||||
|
cute2.print_execution_results();
|
||||||
|
cute2.print_correctness();
|
||||||
|
if (print_latex)
|
||||||
|
cute2.print_execution_results_latex_no_intermediates();
|
||||||
}
|
}
|
||||||
|
|
||||||
blt::size_t hdist(const input_t& a, const input_t& b)
|
blt::size_t hdist(const input_t& a, const input_t& b)
|
||||||
|
|
Loading…
Reference in New Issue