| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include <string> | ||
| 4 | #include <tuple> | ||
| 5 | |||
| 6 | #include "task/include/task.hpp" | ||
| 7 | |||
| 8 | namespace trofimov_n_linear_topology { | ||
| 9 | |||
| 10 | struct InputData { | ||
| 11 | int source; | ||
| 12 | int target; | ||
| 13 | int value; | ||
| 14 | }; | ||
| 15 | |||
| 16 | 110 | inline void Work(int n) { | |
| 17 | 110 | volatile int acc = 0; | |
| 18 | 110 | const int iters = n * 1000; | |
| 19 |
2/2✓ Branch 0 taken 4220000 times.
✓ Branch 1 taken 110 times.
|
4220110 | for (int i = 0; i < iters; ++i) { |
| 20 | 4220000 | acc += i % 13; | |
| 21 | 4220000 | acc ^= acc << 1; | |
| 22 | 4220000 | acc += acc >> 3; | |
| 23 | } | ||
| 24 | 110 | } | |
| 25 | |||
| 26 | using InType = InputData; | ||
| 27 | using OutType = int; | ||
| 28 | |||
| 29 | using TestType = std::tuple<InputData, std::string>; | ||
| 30 | |||
| 31 | using BaseTask = ppc::task::Task<InType, OutType>; | ||
| 32 | |||
| 33 | } // namespace trofimov_n_linear_topology | ||
| 34 |