Wayverb
Main Page
Related Pages
Classes
Files
File List
threaded_engine.h
1
#pragma once
2
3
#include "combined/full_run.h"
4
#include "combined/model/persistent.h"
5
6
#include "waveguide/mesh_descriptor.h"
7
8
#include <future>
9
10
namespace
wayverb
{
11
namespace
combined {
12
25
26
class
complete_engine
final {
27
public
:
28
~
complete_engine
() noexcept;
29
30
void
run(
core::compute_context
compute_context,
31
core::gpu_scene_data
scene_data,
32
model::persistent
persistent,
33
model::output
output);
34
35
bool
is_running()
const
;
36
37
void
cancel();
38
39
using
engine_state_changed
=
util::event<size_t, size_t, state, double>
;
40
using
waveguide_node_positions_changed
=
41
util::event<waveguide::mesh_descriptor>
;
42
using
waveguide_node_pressures_changed
=
43
postprocessing_engine::waveguide_node_pressures_changed
;
44
using
raytracer_reflections_generated
=
45
postprocessing_engine::raytracer_reflections_generated
;
46
using
encountered_error
=
util::event<std::string>
;
47
using
begun
=
util::event<>
;
48
using
finished
=
util::event<>
;
49
50
engine_state_changed::connection connect_engine_state_changed(
51
engine_state_changed::callback_type);
52
53
waveguide_node_positions_changed::connection
54
connect_waveguide_node_positions_changed(
55
waveguide_node_positions_changed::callback_type);
56
57
waveguide_node_pressures_changed::connection
58
connect_waveguide_node_pressures_changed(
59
waveguide_node_pressures_changed::callback_type);
60
61
raytracer_reflections_generated::connection
62
connect_raytracer_reflections_generated(
63
raytracer_reflections_generated::callback_type);
64
65
encountered_error::connection connect_encountered_error(
66
encountered_error::callback_type);
67
68
begun::connection connect_begun(begun::callback_type);
69
finished::connection connect_finished(finished::callback_type);
70
71
private
:
72
void
do_run(
core::compute_context
compute_context,
73
core::gpu_scene_data
scene_data,
74
model::persistent
persistent,
75
model::output
output);
76
77
engine_state_changed
engine_state_changed_;
78
waveguide_node_positions_changed
waveguide_node_positions_changed_;
79
waveguide_node_pressures_changed
waveguide_node_pressures_changed_;
80
raytracer_reflections_generated
raytracer_reflections_generated_;
81
encountered_error
encountered_error_;
82
begun
begun_;
83
finished
finished_;
84
85
std::atomic_bool is_running_{
false
};
86
std::atomic_bool keep_going_{
true
};
87
88
std::future<void> future_;
89
};
90
91
}
// namespace combined
92
}
// namespace wayverb
wayverb::core::generic_scene_data
Definition:
scene_data.h:13
wayverb::combined::model::persistent
Definition:
persistent.h:17
wayverb::combined::model::output
Definition:
output.h:18
wayverb
Definition:
capsule_base.h:9
util::event< size_t, size_t, state, double >
wayverb::core::compute_context
invariant: device is a valid device for the context
Definition:
common.h:13
wayverb::combined::complete_engine
Definition:
threaded_engine.h:26
util::event::connection
Definition:
event.h:28
src
combined
include
combined
threaded_engine.h
Generated by
1.8.11