diff options
Diffstat (limited to 'src/server/CompiledGraph.hpp')
-rw-r--r-- | src/server/CompiledGraph.hpp | 53 |
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 |