GCC Code Coverage Report


Directory: ./
File: tasks/frolova_s_sum_elem_matrix/seq/src/ops_seq.cpp
Date: 2026-01-10 02:40:41
Exec Total Coverage
Lines: 16 16 100.0%
Functions: 5 5 100.0%
Branches: 5 8 62.5%

Line Branch Exec Source
1 #include "frolova_s_sum_elem_matrix/seq/include/ops_seq.hpp"
2
3 #include <cmath>
4 // #include <cstddef>
5 #include <tuple>
6 #include <vector>
7
8 #include "frolova_s_sum_elem_matrix/common/include/common.hpp"
9
10 namespace frolova_s_sum_elem_matrix {
11
12
1/2
✓ Branch 1 taken 80 times.
✗ Branch 2 not taken.
80 FrolovaSSumElemMatrixSEQ::FrolovaSSumElemMatrixSEQ(const InType &in) {
13 SetTypeOfTask(GetStaticTypeOfTask());
14 GetInput() = in;
15 80 GetOutput() = 0.0;
16 80 }
17
18 80 bool FrolovaSSumElemMatrixSEQ::ValidationImpl() {
19 const auto &in = GetInput();
20 const auto &my_matrix = std::get<0>(in);
21 80 int param_dim1 = std::get<1>(in);
22 80 int param_dim2 = std::get<2>(in);
23
24
2/4
✓ Branch 0 taken 80 times.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✓ Branch 3 taken 80 times.
80 return (param_dim1 > 0 && param_dim2 > 0 && static_cast<int>(my_matrix.size()) == (param_dim1 * param_dim2));
25 }
26
27 80 bool FrolovaSSumElemMatrixSEQ::PreProcessingImpl() {
28 80 return true;
29 }
30
31 80 bool FrolovaSSumElemMatrixSEQ::RunImpl() {
32 const std::vector<double> &vect_data = std::get<0>(GetInput());
33
34 double all_sum = 0;
35
2/2
✓ Branch 0 taken 33368 times.
✓ Branch 1 taken 80 times.
33448 for (double val : vect_data) {
36 33368 all_sum += val;
37 }
38
39 80 GetOutput() = all_sum;
40 80 return true;
41 }
42
43 80 bool FrolovaSSumElemMatrixSEQ::PostProcessingImpl() {
44 80 return true;
45 }
46
47 } // namespace frolova_s_sum_elem_matrix
48