| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #include "tabalaev_a_elem_mat_min/seq/include/ops_seq.hpp" | ||
| 2 | |||
| 3 | #include <algorithm> | ||
| 4 | #include <cstddef> | ||
| 5 | #include <vector> | ||
| 6 | |||
| 7 | #include "tabalaev_a_elem_mat_min/common/include/common.hpp" | ||
| 8 | |||
| 9 | namespace tabalaev_a_elem_mat_min { | ||
| 10 | |||
| 11 |
1/2✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
|
48 | TabalaevAElemMatMinSEQ::TabalaevAElemMatMinSEQ(const InType &in) { |
| 12 | SetTypeOfTask(GetStaticTypeOfTask()); | ||
| 13 | GetInput() = in; | ||
| 14 | 48 | GetOutput() = 0; | |
| 15 | 48 | } | |
| 16 | |||
| 17 | 48 | bool TabalaevAElemMatMinSEQ::ValidationImpl() { | |
| 18 | auto &rows = std::get<0>(GetInput()); | ||
| 19 | auto &columns = std::get<1>(GetInput()); | ||
| 20 | auto &matrix = std::get<2>(GetInput()); | ||
| 21 | |||
| 22 |
4/8✓ Branch 0 taken 48 times.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✓ Branch 3 taken 48 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 48 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 48 times.
|
48 | return (rows != 0 && columns != 0) && (rows * columns == matrix.size()) && (GetOutput() == 0); |
| 23 | } | ||
| 24 | |||
| 25 | 48 | bool TabalaevAElemMatMinSEQ::PreProcessingImpl() { | |
| 26 | 48 | GetOutput() = 0; | |
| 27 | 48 | return true; | |
| 28 | } | ||
| 29 | |||
| 30 |
1/2✓ Branch 0 taken 48 times.
✗ Branch 1 not taken.
|
48 | bool TabalaevAElemMatMinSEQ::RunImpl() { |
| 31 | auto &matrix = std::get<2>(GetInput()); | ||
| 32 | |||
| 33 |
1/2✓ Branch 0 taken 48 times.
✗ Branch 1 not taken.
|
48 | if (matrix.empty()) { |
| 34 | return false; | ||
| 35 | } | ||
| 36 | |||
| 37 | 48 | int minik = matrix[0]; | |
| 38 |
2/2✓ Branch 0 taken 1960 times.
✓ Branch 1 taken 48 times.
|
2008 | for (size_t i = 1; i < matrix.size(); i++) { |
| 39 | 1960 | minik = std::min(minik, matrix[i]); | |
| 40 | } | ||
| 41 | |||
| 42 | 48 | GetOutput() = minik; | |
| 43 | 48 | return true; | |
| 44 | } | ||
| 45 | |||
| 46 | 48 | bool TabalaevAElemMatMinSEQ::PostProcessingImpl() { | |
| 47 | 48 | return true; | |
| 48 | } | ||
| 49 | |||
| 50 | } // namespace tabalaev_a_elem_mat_min | ||
| 51 |