| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #include "romanova_v_min_by_matrix_rows_processes/seq/include/ops_seq.hpp" | ||
| 2 | |||
| 3 | #include <algorithm> | ||
| 4 | #include <cstddef> | ||
| 5 | #include <vector> | ||
| 6 | |||
| 7 | #include "romanova_v_min_by_matrix_rows_processes/common/include/common.hpp" | ||
| 8 | |||
| 9 | namespace romanova_v_min_by_matrix_rows_processes { | ||
| 10 | |||
| 11 |
1/2✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
|
48 | RomanovaVMinByMatrixRowsSEQ::RomanovaVMinByMatrixRowsSEQ(const InType &in) { |
| 12 | SetTypeOfTask(GetStaticTypeOfTask()); | ||
| 13 |
1/2✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
|
48 | GetInput() = in; |
| 14 |
1/4✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
|
48 | GetOutput() = OutType(in.size()); |
| 15 | 48 | } | |
| 16 | |||
| 17 |
1/2✓ Branch 0 taken 48 times.
✗ Branch 1 not taken.
|
48 | bool RomanovaVMinByMatrixRowsSEQ::ValidationImpl() { |
| 18 |
2/4✓ Branch 0 taken 48 times.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✓ Branch 3 taken 48 times.
|
48 | return !GetInput().empty() && !GetInput()[0].empty(); |
| 19 | } | ||
| 20 | |||
| 21 | 48 | bool RomanovaVMinByMatrixRowsSEQ::PreProcessingImpl() { | |
| 22 | 48 | in_data_ = GetInput(); | |
| 23 | 48 | n_ = in_data_.size(); | |
| 24 | 48 | m_ = in_data_[0].size(); | |
| 25 | 48 | res_ = OutType(n_); | |
| 26 | 48 | return true; | |
| 27 | } | ||
| 28 | |||
| 29 | 48 | bool RomanovaVMinByMatrixRowsSEQ::RunImpl() { | |
| 30 |
2/2✓ Branch 0 taken 2888 times.
✓ Branch 1 taken 48 times.
|
2936 | for (size_t i = 0; i < n_; i++) { |
| 31 | 2888 | res_[i] = in_data_[i][0]; | |
| 32 |
2/2✓ Branch 0 taken 257920 times.
✓ Branch 1 taken 2888 times.
|
260808 | for (size_t j = 1; j < m_; j++) { |
| 33 | 257920 | res_[i] = std::min(res_[i], in_data_[i][j]); | |
| 34 | } | ||
| 35 | } | ||
| 36 | 48 | return true; | |
| 37 | } | ||
| 38 | |||
| 39 | 48 | bool RomanovaVMinByMatrixRowsSEQ::PostProcessingImpl() { | |
| 40 | 48 | GetOutput() = res_; | |
| 41 | 48 | return true; | |
| 42 | } | ||
| 43 | |||
| 44 | } // namespace romanova_v_min_by_matrix_rows_processes | ||
| 45 |