GCC Code Coverage Report


Directory: ./
File: tasks/akhmetov_daniil_strassen_dense_double_seq/common/include/common.hpp
Date: 2026-05-11 08:26:31
Exec Total Coverage
Lines: 9 9 100.0%
Functions: 3 3 100.0%
Branches: 1 2 50.0%

Line Branch Exec Source
1 #pragma once
2
3 #include <cstddef>
4 #include <vector>
5
6 #include "task/include/task.hpp"
7
8 namespace akhmetov_daniil_strassen_dense_double_seq {
9
10 using Matrix = std::vector<double>;
11 using InType = Matrix;
12 using OutType = Matrix;
13 using TestType = int;
14 using BaseTask = ppc::task::Task<InType, OutType>;
15
16 namespace format {
17
18
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 216 times.
216 inline size_t GetN(const InType &input) {
19 216 return static_cast<size_t>(input.at(0));
20 }
21
22 inline size_t MatrixSize(const InType &input) {
23 return GetN(input) * GetN(input);
24 }
25
26 48 inline Matrix GetA(const InType &input) {
27 48 size_t n = GetN(input);
28 48 return {input.begin() + 1, input.begin() + 1 + static_cast<std::ptrdiff_t>(n * n)};
29 }
30
31 48 inline Matrix GetB(const InType &input) {
32 48 size_t n = GetN(input);
33 48 return {input.begin() + 1 + static_cast<std::ptrdiff_t>(n * n),
34 48 input.begin() + 1 + static_cast<std::ptrdiff_t>(2 * n * n)};
35 }
36
37 } // namespace format
38 } // namespace akhmetov_daniil_strassen_dense_double_seq
39