GCC Code Coverage Report


Directory: ./
File: tasks/timofeev_n_ribbon_scheme_only_a/seq/src/ops_seq.cpp
Date: 2026-01-27 01:59:34
Exec Total Coverage
Lines: 23 23 100.0%
Functions: 6 6 100.0%
Branches: 16 26 61.5%

Line Branch Exec Source
1 #include "timofeev_n_ribbon_scheme_only_a/seq/include/ops_seq.hpp"
2
3 #include <cstddef>
4 #include <vector>
5
6 #include "timofeev_n_ribbon_scheme_only_a/common/include/common.hpp"
7
8 namespace timofeev_n_ribbon_scheme_only_a {
9
10
1/2
✓ Branch 1 taken 128 times.
✗ Branch 2 not taken.
128 TimofeevNRibbonSchemeOnlyASEQ::TimofeevNRibbonSchemeOnlyASEQ(const InType &in) {
11 SetTypeOfTask(GetStaticTypeOfTask());
12 GetInput() = in;
13
1/2
✓ Branch 1 taken 128 times.
✗ Branch 2 not taken.
128 GetOutput() = std::vector<std::vector<int>>(0, std::vector<int>(0));
14 128 }
15
16
1/2
✓ Branch 0 taken 128 times.
✗ Branch 1 not taken.
128 bool TimofeevNRibbonSchemeOnlyASEQ::ValidationImpl() {
17 std::vector<std::vector<int>> &a = GetInput().first;
18 std::vector<std::vector<int>> &b = GetInput().second;
19 size_t n = a.size();
20 size_t m2 = a[0].size();
21 size_t m1 = b.size();
22 size_t k = b[0].size();
23
3/6
✓ Branch 0 taken 128 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 128 times.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✓ Branch 5 taken 128 times.
128 return (m2 == m1 && n != 0 && m1 != 0 && m2 != 0 && k != 0);
24 }
25
26 128 bool TimofeevNRibbonSchemeOnlyASEQ::PreProcessingImpl() {
27 128 return true;
28 }
29
30 840 int TimofeevNRibbonSchemeOnlyASEQ::CalculatingCElement(MatrixType &a, MatrixType &b, size_t &i, size_t &j) {
31 int summ = 0;
32
2/2
✓ Branch 0 taken 2880 times.
✓ Branch 1 taken 840 times.
3720 for (size_t kk = 0; kk < a[0].size(); kk++) {
33 2880 summ += a[i][kk] * b[kk][j];
34 }
35 840 return summ;
36 }
37
38 128 bool TimofeevNRibbonSchemeOnlyASEQ::RunImpl() {
39 128 MatrixType a = GetInput().first;
40
1/2
✓ Branch 1 taken 128 times.
✗ Branch 2 not taken.
128 MatrixType b = GetInput().second;
41
2/4
✓ Branch 1 taken 128 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 128 times.
✗ Branch 5 not taken.
128 std::vector<std::vector<int>> c(a.size(), std::vector<int>(b[0].size()));
42
2/2
✓ Branch 0 taken 296 times.
✓ Branch 1 taken 128 times.
424 for (size_t i = 0; i < a.size(); i++) {
43
2/2
✓ Branch 0 taken 840 times.
✓ Branch 1 taken 296 times.
1136 for (size_t j = 0; j < b[0].size(); j++) {
44 840 c[i][j] = CalculatingCElement(a, b, i, j);
45 }
46 }
47
1/2
✓ Branch 1 taken 128 times.
✗ Branch 2 not taken.
128 GetOutput() = c;
48 128 return true;
49 128 }
50
51 128 bool TimofeevNRibbonSchemeOnlyASEQ::PostProcessingImpl() {
52 128 return true;
53 }
54
55 } // namespace timofeev_n_ribbon_scheme_only_a
56