GCC Code Coverage Report


Directory: ./
File: tasks/zhurin_i_matrix_sums/seq/src/ops_seq.cpp
Date: 2026-01-27 01:59:34
Exec Total Coverage
Lines: 18 18 100.0%
Functions: 5 5 100.0%
Branches: 5 8 62.5%

Line Branch Exec Source
1 #include "zhurin_i_matrix_sums/seq/include/ops_seq.hpp"
2
3 #include <cstddef>
4 #include <cstdint>
5 #include <vector>
6
7 #include "zhurin_i_matrix_sums/common/include/common.hpp"
8
9 namespace zhurin_i_matrix_sums {
10
11
1/2
✓ Branch 1 taken 80 times.
✗ Branch 2 not taken.
80 ZhurinIMatrixSumsSEQ::ZhurinIMatrixSumsSEQ(const InType &in) {
12 SetTypeOfTask(GetStaticTypeOfTask());
13 GetInput() = in;
14 80 GetOutput() = 0.0;
15 80 }
16
17 80 bool ZhurinIMatrixSumsSEQ::ValidationImpl() {
18
1/2
✓ Branch 0 taken 80 times.
✗ Branch 1 not taken.
80 return (static_cast<uint64_t>(std::get<0>(GetInput())) * std::get<1>(GetInput()) == std::get<2>(GetInput()).size()) &&
19
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 80 times.
80 (GetOutput() == 0.0);
20 }
21
22 80 bool ZhurinIMatrixSumsSEQ::PreProcessingImpl() {
23 80 GetOutput() = 0.0;
24 80 return true;
25 }
26
27 80 bool ZhurinIMatrixSumsSEQ::RunImpl() {
28 80 auto rows = std::get<0>(GetInput());
29 80 auto columns = std::get<1>(GetInput());
30 const auto &matrix = std::get<2>(GetInput());
31
32 double sum = 0.0;
33
2/2
✓ Branch 0 taken 632 times.
✓ Branch 1 taken 80 times.
712 for (size_t i = 0; i < static_cast<size_t>(rows) * columns; i++) {
34 632 sum += matrix[i];
35 }
36
37 80 GetOutput() = sum;
38 80 return true;
39 }
40
41 80 bool ZhurinIMatrixSumsSEQ::PostProcessingImpl() {
42 80 return true;
43 }
44
45 } // namespace zhurin_i_matrix_sums
46