GCC Code Coverage Report


Directory: ./
File: tasks/moskaev_v_max_value_elem_matrix/seq/src/ops_seq.cpp
Date: 2026-01-09 01:27:18
Exec Total Coverage
Lines: 20 20 100.0%
Functions: 5 5 100.0%
Branches: 10 12 83.3%

Line Branch Exec Source
1 #include "moskaev_v_max_value_elem_matrix/seq/include/ops_seq.hpp"
2
3 #include <algorithm>
4
5 #include "moskaev_v_max_value_elem_matrix/common/include/common.hpp"
6
7 namespace moskaev_v_max_value_elem_matrix {
8
9
1/2
✓ Branch 1 taken 56 times.
✗ Branch 2 not taken.
56 MoskaevVMaxValueElemMatrixSEQ::MoskaevVMaxValueElemMatrixSEQ(const InType &in) {
10 SetTypeOfTask(GetStaticTypeOfTask());
11
1/2
✓ Branch 1 taken 56 times.
✗ Branch 2 not taken.
56 GetInput() = InType(in);
12 56 GetOutput() = 0;
13 56 }
14
15 56 bool MoskaevVMaxValueElemMatrixSEQ::ValidationImpl() {
16 56 return (GetOutput() == 0);
17 }
18
19 56 bool MoskaevVMaxValueElemMatrixSEQ::PreProcessingImpl() {
20 56 return true;
21 }
22
23
2/2
✓ Branch 0 taken 8 times.
✓ Branch 1 taken 48 times.
56 bool MoskaevVMaxValueElemMatrixSEQ::RunImpl() {
24
2/2
✓ Branch 0 taken 8 times.
✓ Branch 1 taken 48 times.
56 if (GetInput().empty()) {
25 8 GetOutput() = 0;
26 8 return true;
27 }
28 const auto &matrix = GetInput();
29
30 48 int max_element = matrix[0][0];
31
2/2
✓ Branch 0 taken 1512 times.
✓ Branch 1 taken 48 times.
1560 for (const auto &row : matrix) {
32
2/2
✓ Branch 0 taken 104568 times.
✓ Branch 1 taken 1512 times.
106080 for (int element : row) {
33 104568 max_element = std::max(element, max_element);
34 }
35 }
36
37 48 GetOutput() = max_element;
38 48 return true;
39 }
40
41 56 bool MoskaevVMaxValueElemMatrixSEQ::PostProcessingImpl() {
42 56 return true;
43 }
44
45 } // namespace moskaev_v_max_value_elem_matrix
46