| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #include "kutuzov_i_elem_vec_average/seq/include/ops_seq.hpp" | ||
| 2 | |||
| 3 | #include <vector> | ||
| 4 | |||
| 5 | #include "kutuzov_i_elem_vec_average/common/include/common.hpp" | ||
| 6 | |||
| 7 | namespace kutuzov_i_elem_vec_average { | ||
| 8 | |||
| 9 |
1/2✓ Branch 1 taken 32 times.
✗ Branch 2 not taken.
|
32 | KutuzovIElemVecAverageSEQ::KutuzovIElemVecAverageSEQ(const InType &in) { |
| 10 | SetTypeOfTask(GetStaticTypeOfTask()); | ||
| 11 |
1/2✓ Branch 1 taken 32 times.
✗ Branch 2 not taken.
|
32 | GetInput() = in; |
| 12 | 32 | GetOutput() = 0.0; | |
| 13 | 32 | } | |
| 14 | |||
| 15 | 32 | bool KutuzovIElemVecAverageSEQ::ValidationImpl() { | |
| 16 | 32 | return !GetInput().empty(); | |
| 17 | } | ||
| 18 | |||
| 19 | 32 | bool KutuzovIElemVecAverageSEQ::PreProcessingImpl() { | |
| 20 | 32 | return true; | |
| 21 | } | ||
| 22 | |||
| 23 | 32 | bool KutuzovIElemVecAverageSEQ::RunImpl() { | |
| 24 | 32 | GetOutput() = 0.0; | |
| 25 |
2/2✓ Branch 0 taken 88088 times.
✓ Branch 1 taken 32 times.
|
88120 | for (double x : GetInput()) { |
| 26 | 88088 | GetOutput() += x; | |
| 27 | } | ||
| 28 | |||
| 29 | 32 | GetOutput() /= static_cast<double>(GetInput().size()); | |
| 30 | |||
| 31 | 32 | return true; | |
| 32 | } | ||
| 33 | |||
| 34 | 32 | bool KutuzovIElemVecAverageSEQ::PostProcessingImpl() { | |
| 35 | 32 | return true; | |
| 36 | } | ||
| 37 | |||
| 38 | } // namespace kutuzov_i_elem_vec_average | ||
| 39 |