1 #include "gaze/pipeline.h"
9 #include "gaze/gui/event_manager.h"
10 #include "gaze/pipeline_step.h"
11 #include "gaze/util/data.h"
16 void Pipeline::operator()() {
17 while (!this->running) {
20 while (this->running) {
23 for (PipelineStep* step : this->steps) {
24 std::chrono::high_resolution_clock::time_point start =
25 std::chrono::high_resolution_clock::now();
29 std::chrono::high_resolution_clock::time_point
end =
30 std::chrono::high_resolution_clock::now();
31 data.execution_times.insert(
39 this->current_data = data;
43 gui::Events::PIPELINE_DATA_UPDATED);
48 const bool start) : steps(steps) {
66 this->running =
false;
71 return this->current_data;
static EventManager & instance()
iterator_traits< _InputIterator >::difference_type count(_InputIterator __first, _InputIterator __last, const _Tp &__value)
void publish(void *data, Events event)
std::vector< PipelineStep * > get_steps()
Pipeline(std::vector< PipelineStep * > steps, const bool start=true)
void lock(_L1 &__l1, _L2 &__l2, _L3 &...__l3)
constexpr enable_if< __is_duration< _ToDur >::value, _ToDur >::type duration_cast(const duration< _Rep, _Period > &__d)
void sleep_for(const chrono::duration< _Rep, _Period > &__rtime)
reference_wrapper< _Tp > ref(_Tp &__t) noexcept
_Tp * end(valarray< _Tp > &__va)
Wraps the data acquired per frame into a single instance.