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