| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #include "potashnik_m_star_topol/seq/include/ops_seq.hpp" | ||
| 2 | |||
| 3 | #include <tuple> | ||
| 4 | #include <vector> | ||
| 5 | |||
| 6 | #include "potashnik_m_star_topol/common/include/common.hpp" | ||
| 7 | |||
| 8 | namespace potashnik_m_star_topol { | ||
| 9 | |||
| 10 |
1/2✓ Branch 1 taken 40 times.
✗ Branch 2 not taken.
|
40 | PotashnikMStarTopolSEQ::PotashnikMStarTopolSEQ(const InType &in) { |
| 11 | SetTypeOfTask(GetStaticTypeOfTask()); | ||
| 12 |
1/2✓ Branch 1 taken 40 times.
✗ Branch 2 not taken.
|
40 | GetInput() = in; |
| 13 | GetOutput() = std::make_tuple(0, 0); | ||
| 14 | 40 | } | |
| 15 | |||
| 16 | 40 | bool PotashnikMStarTopolSEQ::ValidationImpl() { | |
| 17 | 40 | return !GetInput().empty(); | |
| 18 | } | ||
| 19 | |||
| 20 | 40 | bool PotashnikMStarTopolSEQ::PreProcessingImpl() { | |
| 21 | 40 | return true; | |
| 22 | } | ||
| 23 | |||
| 24 | 40 | bool PotashnikMStarTopolSEQ::RunImpl() { | |
| 25 | // Sequential version just for CI tests to pass | ||
| 26 | 40 | std::vector<int> tmp; | |
| 27 |
1/2✓ Branch 1 taken 40 times.
✗ Branch 2 not taken.
|
40 | tmp.reserve(10000000); |
| 28 | |||
| 29 |
2/2✓ Branch 0 taken 400000000 times.
✓ Branch 1 taken 40 times.
|
400000040 | for (int i = 0; i < 10000000; i++) { |
| 30 | tmp.push_back(i); | ||
| 31 | } | ||
| 32 | |||
| 33 | int sum = 0; | ||
| 34 |
2/2✓ Branch 0 taken 400000000 times.
✓ Branch 1 taken 40 times.
|
400000040 | for (int i = 0; i < 10000000; i++) { |
| 35 | 400000000 | sum += tmp[i]; | |
| 36 | } | ||
| 37 | |||
| 38 | GetOutput() = std::make_tuple(sum, 0); | ||
| 39 | 40 | return true; | |
| 40 | } | ||
| 41 | |||
| 42 | 40 | bool PotashnikMStarTopolSEQ::PostProcessingImpl() { | |
| 43 | 40 | return true; | |
| 44 | } | ||
| 45 | |||
| 46 | } // namespace potashnik_m_star_topol | ||
| 47 |