summaryrefslogtreecommitdiffstats
path: root/src/server/CompiledGraph.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-11-12 19:57:56 +0100
committerDavid Robillard <d@drobilla.net>2017-11-12 19:58:13 +0100
commitf8cd75372d9c45a0a8616d89a18a5b9906ac9d54 (patch)
treeeb9b06bc00c2d3b36f1f56cbd6fad7cd33df6ae0 /src/server/CompiledGraph.hpp
parenta66df006ccd3426148491f0a4c21c9facb8104ea (diff)
downloadingen-tasks.tar.gz
ingen-tasks.tar.bz2
ingen-tasks.zip
WIP: Clean up task implementationtasks
Diffstat (limited to 'src/server/CompiledGraph.hpp')
-rw-r--r--src/server/CompiledGraph.hpp53
1 files changed, 4 insertions, 49 deletions
diff --git a/src/server/CompiledGraph.hpp b/src/server/CompiledGraph.hpp
index 833ae0c6..24a12351 100644
--- a/src/server/CompiledGraph.hpp
+++ b/src/server/CompiledGraph.hpp
@@ -17,66 +17,21 @@
#ifndef INGEN_ENGINE_COMPILEDGRAPH_HPP
#define INGEN_ENGINE_COMPILEDGRAPH_HPP
-#include <functional>
-#include <set>
-#include <vector>
-
#include "ingen/types.hpp"
#include "raul/Maid.hpp"
-#include "raul/Noncopyable.hpp"
#include "Task.hpp"
namespace Ingen {
namespace Server {
-class BlockImpl;
class GraphImpl;
-class RunContext;
-
-/** A graph ``compiled'' into a quickly executable form.
- *
- * This is a flat sequence of nodes ordered such that the process thread can
- * execute the nodes in order and have nodes always executed before any of
- * their dependencies.
- */
-class CompiledGraph : public Raul::Maid::Disposable
- , public Raul::Noncopyable
-{
-public:
- static MPtr<CompiledGraph> compile(Raul::Maid& maid, GraphImpl& graph);
-
- void run(RunContext& context);
-
-private:
- friend class Raul::Maid; ///< Allow make_managed to construct
-
- CompiledGraph(GraphImpl* graph);
-
- typedef std::set<BlockImpl*> BlockSet;
-
- void dump(const std::string& name) const;
-
- void compile_graph(GraphImpl* graph);
-
- void compile_block(BlockImpl* block,
- Task& task,
- size_t max_depth,
- BlockSet& k);
-
- void compile_provider(const BlockImpl* root,
- BlockImpl* block,
- Task& task,
- size_t max_depth,
- BlockSet& k);
+class BlockImpl;
- Task _master;
-};
+/** A graph ``compiled'' into an efficiently executable form. */
+using CompiledGraph = Raul::Maid::Managed<Task>;
-inline MPtr<CompiledGraph> compile(Raul::Maid& maid, GraphImpl& graph)
-{
- return CompiledGraph::compile(maid, graph);
-}
+MPtr<CompiledGraph> compile(Raul::Maid& maid, GraphImpl& graph);
} // namespace Server
} // namespace Ingen