GCC Code Coverage Report


Directory: ./
File: tasks/zyuzin_n_sum_elements_of_matrix/seq/src/ops_seq.cpp
Date: 2026-02-23 23:20:07
Exec Total Coverage
Lines: 13 13 100.0%
Functions: 5 5 100.0%
Branches: 4 8 50.0%

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