| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #include "guseva_a_matrix_sums/seq/include/ops_seq.hpp" | ||
| 2 | |||
| 3 | #include <cstdint> | ||
| 4 | |||
| 5 | #include "guseva_a_matrix_sums/common/include/common.hpp" | ||
| 6 | |||
| 7 | namespace guseva_a_matrix_sums { | ||
| 8 | |||
| 9 |
1/2✓ Branch 1 taken 80 times.
✗ Branch 2 not taken.
|
80 | GusevaAMatrixSumsSEQ::GusevaAMatrixSumsSEQ(const InType &in) { |
| 10 | SetTypeOfTask(GetStaticTypeOfTask()); | ||
| 11 | GetInput() = in; | ||
| 12 | GetOutput() = {}; | ||
| 13 | 80 | } | |
| 14 | |||
| 15 | 80 | bool GusevaAMatrixSumsSEQ::ValidationImpl() { | |
| 16 |
2/4✓ Branch 0 taken 80 times.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✓ Branch 3 taken 80 times.
|
80 | return (static_cast<uint64_t>(std::get<0>(GetInput())) * std::get<1>(GetInput()) == std::get<2>(GetInput()).size()) && |
| 17 | 80 | (GetOutput().empty()); | |
| 18 | } | ||
| 19 | |||
| 20 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 80 times.
|
80 | bool GusevaAMatrixSumsSEQ::PreProcessingImpl() { |
| 21 | GetOutput().clear(); | ||
| 22 | 80 | GetOutput().resize(std::get<1>(GetInput()), 0.0); | |
| 23 | 80 | return true; | |
| 24 | } | ||
| 25 | |||
| 26 | 80 | bool GusevaAMatrixSumsSEQ::RunImpl() { | |
| 27 | const auto &[rows, columns, matrix] = GetInput(); | ||
| 28 |
2/2✓ Branch 0 taken 10504 times.
✓ Branch 1 taken 80 times.
|
10584 | for (uint32_t i = 0; i < rows; i++) { |
| 29 |
2/2✓ Branch 0 taken 1651608 times.
✓ Branch 1 taken 10504 times.
|
1662112 | for (uint32_t j = 0; j < columns; j++) { |
| 30 | 1651608 | GetOutput()[j] += matrix[(i * columns) + j]; | |
| 31 | } | ||
| 32 | } | ||
| 33 | 80 | return true; | |
| 34 | } | ||
| 35 | |||
| 36 | 80 | bool GusevaAMatrixSumsSEQ::PostProcessingImpl() { | |
| 37 | 80 | return true; | |
| 38 | } | ||
| 39 | |||
| 40 | } // namespace guseva_a_matrix_sums | ||
| 41 |