GCC Code Coverage Report


Directory: ./
File: tasks/zorin_d_avg_vec/seq/src/ops_seq.cpp
Date: 2026-01-27 01:59:34
Exec Total Coverage
Lines: 16 16 100.0%
Functions: 5 5 100.0%
Branches: 6 8 75.0%

Line Branch Exec Source
1 #include "zorin_d_avg_vec/seq/include/ops_seq.hpp"
2
3 #include <numeric>
4 #include <vector>
5
6 #include "zorin_d_avg_vec/common/include/common.hpp"
7
8 namespace zorin_d_avg_vec {
9
10
1/2
✓ Branch 1 taken 40 times.
✗ Branch 2 not taken.
40 ZorinDAvgVecSEQ::ZorinDAvgVecSEQ(const InType &in) {
11 SetTypeOfTask(GetStaticTypeOfTask());
12
1/2
✓ Branch 1 taken 40 times.
✗ Branch 2 not taken.
40 GetInput() = in;
13 40 GetOutput() = 0;
14 40 }
15
16 40 bool ZorinDAvgVecSEQ::ValidationImpl() {
17 40 return true;
18 }
19
20 40 bool ZorinDAvgVecSEQ::PreProcessingImpl() {
21 40 return true;
22 }
23
24
2/2
✓ Branch 0 taken 8 times.
✓ Branch 1 taken 32 times.
40 bool ZorinDAvgVecSEQ::RunImpl() {
25 const auto &vec = GetInput();
26
2/2
✓ Branch 0 taken 8 times.
✓ Branch 1 taken 32 times.
40 if (vec.empty()) {
27 8 GetOutput() = 0.0;
28 8 return true;
29 }
30
31 const double sum = std::accumulate(vec.begin(), vec.end(), 0.0);
32 32 GetOutput() = sum / static_cast<double>(vec.size());
33
34 32 return true;
35 }
36
37 40 bool ZorinDAvgVecSEQ::PostProcessingImpl() {
38 40 return true;
39 }
40
41 } // namespace zorin_d_avg_vec
42