| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #include "gutyansky_a_matrix_band_multiplication/seq/include/ops_seq.hpp" | ||
| 2 | |||
| 3 | #include <cstddef> | ||
| 4 | #include <vector> | ||
| 5 | |||
| 6 | #include "gutyansky_a_matrix_band_multiplication/common/include/common.hpp" | ||
| 7 | |||
| 8 | namespace gutyansky_a_matrix_band_multiplication { | ||
| 9 | |||
| 10 |
1/2✓ Branch 1 taken 72 times.
✗ Branch 2 not taken.
|
72 | GutyanskyAMatrixBandMultiplicationSEQ::GutyanskyAMatrixBandMultiplicationSEQ(const InType &in) { |
| 11 | SetTypeOfTask(GetStaticTypeOfTask()); | ||
| 12 | |||
| 13 |
1/2✓ Branch 1 taken 72 times.
✗ Branch 2 not taken.
|
72 | GetInput() = in; |
| 14 | 72 | GetOutput() = {}; | |
| 15 | 72 | } | |
| 16 | |||
| 17 |
2/4✓ Branch 0 taken 72 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 72 times.
✗ Branch 3 not taken.
|
144 | bool GutyanskyAMatrixBandMultiplicationSEQ::ValidationImpl() { |
| 18 | if (!GetInput().first.IsValid()) { | ||
| 19 | return false; | ||
| 20 | } | ||
| 21 | if (!GetInput().second.IsValid()) { | ||
| 22 | return false; | ||
| 23 | } | ||
| 24 | |||
| 25 | 72 | return GetInput().first.cols == GetInput().second.rows; | |
| 26 | } | ||
| 27 | |||
| 28 | 72 | bool GutyanskyAMatrixBandMultiplicationSEQ::PreProcessingImpl() { | |
| 29 | 72 | return true; | |
| 30 | } | ||
| 31 | |||
| 32 | 72 | bool GutyanskyAMatrixBandMultiplicationSEQ::RunImpl() { | |
| 33 | 72 | GetOutput().rows = GetInput().first.rows; | |
| 34 | 72 | GetOutput().cols = GetInput().second.cols; | |
| 35 | 72 | GetOutput().data.assign(GetOutput().rows * GetOutput().cols, 0); | |
| 36 | |||
| 37 |
2/2✓ Branch 0 taken 160 times.
✓ Branch 1 taken 72 times.
|
232 | for (size_t i = 0; i < GetOutput().rows; i++) { |
| 38 |
2/2✓ Branch 0 taken 384 times.
✓ Branch 1 taken 160 times.
|
544 | for (size_t j = 0; j < GetOutput().cols; j++) { |
| 39 |
2/2✓ Branch 0 taken 960 times.
✓ Branch 1 taken 384 times.
|
1344 | for (size_t k = 0; k < GetInput().first.cols; k++) { |
| 40 | 960 | GetOutput().data[(i * GetOutput().cols) + j] += GetInput().first.data[(i * GetInput().first.cols) + k] * | |
| 41 | 960 | GetInput().second.data[(k * GetInput().second.cols) + j]; | |
| 42 | } | ||
| 43 | } | ||
| 44 | } | ||
| 45 | |||
| 46 | 72 | return true; | |
| 47 | } | ||
| 48 | |||
| 49 | 72 | bool GutyanskyAMatrixBandMultiplicationSEQ::PostProcessingImpl() { | |
| 50 | 72 | return true; | |
| 51 | } | ||
| 52 | |||
| 53 | } // namespace gutyansky_a_matrix_band_multiplication | ||
| 54 |