| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #include "balchunayte_z_reduce/seq/include/ops_seq.hpp" | ||
| 2 | |||
| 3 | #include <numeric> | ||
| 4 | |||
| 5 | #include "balchunayte_z_reduce/common/include/common.hpp" | ||
| 6 | |||
| 7 | namespace balchunayte_z_reduce { | ||
| 8 | |||
| 9 |
1/2✓ Branch 1 taken 32 times.
✗ Branch 2 not taken.
|
32 | BalchunayteZReduceSEQ::BalchunayteZReduceSEQ(const InType &in) { |
| 10 | SetTypeOfTask(GetStaticTypeOfTask()); | ||
| 11 | GetInput() = in; | ||
| 12 | 32 | GetOutput() = 0.0; | |
| 13 | 32 | } | |
| 14 | |||
| 15 |
1/2✓ Branch 0 taken 32 times.
✗ Branch 1 not taken.
|
32 | bool BalchunayteZReduceSEQ::ValidationImpl() { |
| 16 | const auto &in = GetInput(); | ||
| 17 | |||
| 18 |
1/2✓ Branch 0 taken 32 times.
✗ Branch 1 not taken.
|
32 | if (in.data.empty()) { |
| 19 | return false; | ||
| 20 | } | ||
| 21 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 32 times.
|
32 | if (in.root < 0) { |
| 22 | ✗ | return false; | |
| 23 | } | ||
| 24 | return true; | ||
| 25 | } | ||
| 26 | |||
| 27 | 32 | bool BalchunayteZReduceSEQ::PreProcessingImpl() { | |
| 28 | 32 | GetOutput() = 0.0; | |
| 29 | 32 | return true; | |
| 30 | } | ||
| 31 | |||
| 32 | 32 | bool BalchunayteZReduceSEQ::RunImpl() { | |
| 33 | const auto &data = GetInput().data; | ||
| 34 | 32 | GetOutput() = std::accumulate(data.begin(), data.end(), 0.0); | |
| 35 | 32 | return true; | |
| 36 | } | ||
| 37 | |||
| 38 | 32 | bool BalchunayteZReduceSEQ::PostProcessingImpl() { | |
| 39 | 32 | return true; | |
| 40 | } | ||
| 41 | |||
| 42 | } // namespace balchunayte_z_reduce | ||
| 43 |