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