| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #include "kurpiakov_a_elem_vec_sum/seq/include/ops_seq.hpp" | ||
| 2 | |||
| 3 | #include <utility> | ||
| 4 | #include <vector> | ||
| 5 | |||
| 6 | #include "kurpiakov_a_elem_vec_sum/common/include/common.hpp" | ||
| 7 | |||
| 8 | namespace kurpiakov_a_elem_vec_sum { | ||
| 9 |
1/2✓ Branch 1 taken 80 times.
✗ Branch 2 not taken.
|
80 | KurpiakovAElemVecSumSEQ::KurpiakovAElemVecSumSEQ(const InType &in) { |
| 10 | SetTypeOfTask(GetStaticTypeOfTask()); | ||
| 11 | GetInput() = in; | ||
| 12 | 80 | GetOutput() = 0; | |
| 13 | 80 | } | |
| 14 | |||
| 15 | 80 | bool KurpiakovAElemVecSumSEQ::ValidationImpl() { | |
| 16 |
2/4✓ Branch 0 taken 80 times.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✓ Branch 3 taken 80 times.
|
80 | bool res = (GetOutput() == 0) && (std::cmp_equal((std::get<1>(GetInput()).size()), std::get<0>(GetInput()))); |
| 17 | 80 | return res; | |
| 18 | } | ||
| 19 | |||
| 20 | 80 | bool KurpiakovAElemVecSumSEQ::PreProcessingImpl() { | |
| 21 | 80 | GetOutput() = 0; | |
| 22 | 80 | return true; | |
| 23 | } | ||
| 24 | |||
| 25 | 80 | bool KurpiakovAElemVecSumSEQ::RunImpl() { | |
| 26 | 80 | std::vector<int> vec = std::get<1>(GetInput()); | |
| 27 | OutType res = 0LL; | ||
| 28 |
2/2✓ Branch 0 taken 168 times.
✓ Branch 1 taken 80 times.
|
248 | for (const int &it : vec) { |
| 29 | 168 | res += static_cast<OutType>(it); | |
| 30 | } | ||
| 31 |
2/2✓ Branch 0 taken 64 times.
✓ Branch 1 taken 16 times.
|
80 | GetOutput() = res; |
| 32 | 80 | return true; | |
| 33 | } | ||
| 34 | |||
| 35 | 80 | bool KurpiakovAElemVecSumSEQ::PostProcessingImpl() { | |
| 36 | 80 | return true; | |
| 37 | } | ||
| 38 | |||
| 39 | } // namespace kurpiakov_a_elem_vec_sum | ||
| 40 |