GCC Code Coverage Report


Directory: ./
File: tasks/pikhotskiy_r_elem_vec_sum/seq/src/ops_seq.cpp
Date: 2026-01-10 02:40:41
Exec Total Coverage
Lines: 17 17 100.0%
Functions: 5 5 100.0%
Branches: 4 6 66.7%

Line Branch Exec Source
1 #include "pikhotskiy_r_elem_vec_sum/seq/include/ops_seq.hpp"
2
3 #include <utility>
4 #include <vector>
5
6 #include "pikhotskiy_r_elem_vec_sum/common/include/common.hpp"
7
8 namespace pikhotskiy_r_elem_vec_sum {
9
1/2
✓ Branch 1 taken 116 times.
✗ Branch 2 not taken.
116 PikhotskiyRElemVecSumSEQ::PikhotskiyRElemVecSumSEQ(const InType &in) {
10 SetTypeOfTask(GetStaticTypeOfTask());
11 GetInput() = in;
12 116 GetOutput() = 0;
13 116 }
14
15 116 bool PikhotskiyRElemVecSumSEQ::ValidationImpl() {
16 const auto &input_tuple = GetInput();
17 116 bool output_ok = (GetOutput() == 0);
18
1/2
✓ Branch 0 taken 116 times.
✗ Branch 1 not taken.
116 bool size_ok = std::cmp_equal(std::get<1>(input_tuple).size(), std::get<0>(input_tuple));
19 116 return output_ok && size_ok;
20 }
21
22 116 bool PikhotskiyRElemVecSumSEQ::PreProcessingImpl() {
23 116 GetOutput() = 0;
24 116 return true;
25 }
26
27 116 bool PikhotskiyRElemVecSumSEQ::RunImpl() {
28 const std::vector<int> &numbers = std::get<1>(GetInput());
29 OutType total = 0LL;
30
31
2/2
✓ Branch 0 taken 348 times.
✓ Branch 1 taken 116 times.
464 for (const int num : numbers) {
32 348 total += static_cast<OutType>(num);
33 }
34
35 116 GetOutput() = total;
36 116 return true;
37 }
38
39 116 bool PikhotskiyRElemVecSumSEQ::PostProcessingImpl() {
40 116 return true;
41 }
42
43 } // namespace pikhotskiy_r_elem_vec_sum
44