1#include "run/manager.h"
2#include "mode/counters.h"
9#include <utils/logging.h>
11#include "run/registry.h"
12#include "run/handlers.h"
15void run::drivers::SimulatedRun::run() {
16 LOG_ALWAYS(
"run::drivers::SimulatedRun::run not yet implemented");
22void run::drivers::DummyDemoRun::run() {
23 LOG_ALWAYS(
"run::drivers::DummyDemoRun starting, for testing protocol code infrastructure");
25 LOGMEV(
"IC TIME: %lld", config.ic_time);
26 LOGMEV(
"OP TIME: %lld", config.op_time);
28 if(state_change_handler)
29 state_change_handler->handle(to(RunState::IC, 0), *
this);
31 LOG_ALWAYS(
"No state change handler");
36 auto &perf = mode::PerformanceCounter::get();
37 perf.add(mode::Mode::IC, config.ic_time / 1000);
38 perf.add(mode::Mode::OP, config.op_time / 1000);
41 if(state_change_handler) state_change_handler->handle(to(RunState::OP, config.ic_time), *
this);
43 constexpr const size_t outer = 100, inner = 100;
45 auto *data32 =
new uint32_t[outer*inner];
46 auto *data16 =
new uint16_t[outer*inner];
49 for(
size_t j=0; j<outer*inner; j++) {
50 data32[j] = j; data16[j] = j;
54 data_handler->handle(data32, 100, 100, *
this);
56 LOG_ALWAYS(
"No data handler");
59 alt_data_handler->handle(data16, 100, 100, *
this);
61 LOG_ALWAYS(
"No alt data handler");
63 if(state_change_handler) state_change_handler->handle(to(RunState::DONE, config.ic_time+config.op_time), *
this);