GCC Code Coverage Report


Directory: ./
File: tasks/gusev_d_star/seq/src/ops_seq.cpp
Date: 2026-01-10 02:40:41
Exec Total Coverage
Lines: 22 22 100.0%
Functions: 5 5 100.0%
Branches: 7 8 87.5%

Line Branch Exec Source
1 #include "gusev_d_star/seq/include/ops_seq.hpp"
2
3 #include "gusev_d_star/common/include/common.hpp"
4
5 namespace gusev_d_star {
6
7 168 GusevDStarSEQ::GusevDStarSEQ(const InType &in) {
8 SetTypeOfTask(GetStaticTypeOfTask());
9 168 GetInput() = in;
10 GetOutput() = 0;
11 168 }
12
13 168 bool GusevDStarSEQ::ValidationImpl() {
14 168 return (GetInput() > 0);
15 }
16
17 168 bool GusevDStarSEQ::PreProcessingImpl() {
18 168 GetOutput() = 2 * GetInput();
19 168 return true;
20 }
21
22 168 bool GusevDStarSEQ::RunImpl() {
23 168 auto n = GetInput();
24
1/2
✓ Branch 0 taken 168 times.
✗ Branch 1 not taken.
168 if (n == 0) {
25 return false;
26 }
27
28 168 volatile int local_res = 0;
29
30
2/2
✓ Branch 0 taken 16640 times.
✓ Branch 1 taken 168 times.
16808 for (int i = 0; i < n; i++) {
31
2/2
✓ Branch 0 taken 3266336 times.
✓ Branch 1 taken 16640 times.
3282976 for (int j = 0; j < n; j++) {
32
2/2
✓ Branch 0 taken 779276816 times.
✓ Branch 1 taken 3266336 times.
782543152 for (int k = 0; k < n; k++) {
33 779276816 local_res += (i + j + k);
34 779276816 local_res -= (i + j + k);
35 }
36 }
37 }
38
39 168 GetOutput() += local_res;
40 168 return true;
41 }
42
43 168 bool GusevDStarSEQ::PostProcessingImpl() {
44 168 GetOutput() -= GetInput();
45 168 return true;
46 }
47
48 } // namespace gusev_d_star
49