GCC Code Coverage Report


Directory: ./
File: tasks/golovanov_d_matrix_max_elem/seq/src/ops_seq.cpp
Date: 2026-01-27 01:59:34
Exec Total Coverage
Lines: 17 17 100.0%
Functions: 5 5 100.0%
Branches: 5 10 50.0%

Line Branch Exec Source
1 #include "golovanov_d_matrix_max_elem//seq/include/ops_seq.hpp"
2
3 #include <algorithm>
4 #include <vector>
5
6 #include "golovanov_d_matrix_max_elem//common/include/common.hpp"
7
8 namespace golovanov_d_matrix_max_elem {
9
10
1/2
✓ Branch 1 taken 32 times.
✗ Branch 2 not taken.
32 GolovanovDMatrixMaxElemSEQ::GolovanovDMatrixMaxElemSEQ(const InType &in) {
11 SetTypeOfTask(GetStaticTypeOfTask());
12 GetInput() = in;
13 32 GetOutput() = 0;
14 32 }
15
16 32 bool GolovanovDMatrixMaxElemSEQ::ValidationImpl() {
17 32 int columns = std::get<0>(GetInput());
18 32 int strokes = std::get<1>(GetInput());
19
2/4
✓ Branch 0 taken 32 times.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✓ Branch 3 taken 32 times.
32 return (columns > 0) && (strokes > 0) && (static_cast<int>(std::get<2>(GetInput()).size()) == (strokes * columns)) &&
20
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 32 times.
32 (GetOutput() == 0);
21 }
22
23 32 bool GolovanovDMatrixMaxElemSEQ::PreProcessingImpl() {
24 32 return true;
25 }
26
27 32 bool GolovanovDMatrixMaxElemSEQ::RunImpl() {
28 32 std::vector<double> elems = std::get<2>(GetInput());
29 32 double max = *std::ranges::max_element(elems);
30
1/2
✓ Branch 0 taken 32 times.
✗ Branch 1 not taken.
32 GetOutput() = max;
31 32 return true;
32 }
33
34 32 bool GolovanovDMatrixMaxElemSEQ::PostProcessingImpl() {
35 32 return true;
36 }
37
38 } // namespace golovanov_d_matrix_max_elem
39