GCC Code Coverage Report


Directory: ./
File: tasks/kondakov_v_reduce/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: 7 9 77.8%

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