GCC Code Coverage Report


Directory: ./
File: tasks/chaschin_v_max_for_each_row/seq/src/ops_seq.cpp
Date: 2025-12-13 04:24:21
Exec Total Coverage
Lines: 14 14 100.0%
Functions: 5 5 100.0%
Branches: 4 6 66.7%

Line Branch Exec Source
1 #include "chaschin_v_max_for_each_row/seq/include/ops_seq.hpp"
2
3 #include <algorithm>
4 #include <cstddef>
5 #include <utility>
6
7 #include "chaschin_v_max_for_each_row/common/include/common.hpp"
8
9 namespace chaschin_v_max_for_each_row {
10
11
1/2
✓ Branch 1 taken 160 times.
✗ Branch 2 not taken.
160 ChaschinVMaxForEachRowSEQ::ChaschinVMaxForEachRowSEQ(const InType &in) {
12 SetTypeOfTask(GetStaticTypeOfTask());
13
1/2
✓ Branch 1 taken 160 times.
✗ Branch 2 not taken.
160 auto in_copy = in;
14 160 GetInput() = std::move(in_copy);
15 this->GetOutput().clear();
16 160 }
17
18 160 bool ChaschinVMaxForEachRowSEQ::ValidationImpl() {
19 const auto &in = GetInput();
20
21 if (in.empty()) {
22 return in.empty();
23 }
24
25 if (in[0].empty()) {
26 return in[0].empty();
27 }
28
29 return true;
30 }
31
32 160 bool ChaschinVMaxForEachRowSEQ::PreProcessingImpl() {
33 const auto &mat = GetInput();
34 160 GetOutput().assign(mat.size(), 0.0F);
35 160 return true;
36 }
37
38 160 bool ChaschinVMaxForEachRowSEQ::RunImpl() {
39 const auto &mat = GetInput();
40 auto &out = GetOutput();
41
42
2/2
✓ Branch 0 taken 512 times.
✓ Branch 1 taken 160 times.
672 for (size_t i = 0; i < mat.size(); i++) {
43 512 out[i] = *std::max_element(mat[i].begin(), mat[i].end());
44 }
45
46 160 return true;
47 }
48
49 160 bool ChaschinVMaxForEachRowSEQ::PostProcessingImpl() {
50 160 return true;
51 }
52
53 } // namespace chaschin_v_max_for_each_row
54