summaryrefslogtreecommitdiffstats
path: root/src/server/BlockImpl.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-11-23 14:24:07 -0500
committerDavid Robillard <d@drobilla.net>2016-10-02 12:24:56 -0400
commit938456884934a74a2850c02edc17575021131709 (patch)
treeca3b5296ee9ab3b911499f2fbef8eafdc826bc0c /src/server/BlockImpl.hpp
parenta077166ec6c31ad4aaab738b9dffc139bf3a4d50 (diff)
downloadingen-938456884934a74a2850c02edc17575021131709.tar.gz
ingen-938456884934a74a2850c02edc17575021131709.tar.bz2
ingen-938456884934a74a2850c02edc17575021131709.zip
Add parallelism-aware graph traversal
Diffstat (limited to 'src/server/BlockImpl.hpp')
-rw-r--r--src/server/BlockImpl.hpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/server/BlockImpl.hpp b/src/server/BlockImpl.hpp
index 47eaa6eb..2d7211ab 100644
--- a/src/server/BlockImpl.hpp
+++ b/src/server/BlockImpl.hpp
@@ -178,9 +178,10 @@ public:
uint32_t num_ports() const { return _ports ? _ports->size() : 0; }
virtual uint32_t polyphony() const { return _polyphony; }
- /** Used by the process order finding algorithm (ie during connections) */
- bool traversed() const { return _traversed; }
- void traversed(bool b) { _traversed = b; }
+ /** Mark used during graph compilation */
+ enum class Mark { UNVISITED, VISITING, VISITED };
+ Mark get_mark() const { return _mark; }
+ void set_mark(Mark m) { _mark = m; }
protected:
PortImpl* nth_port_by_type(uint32_t n, bool input, PortType type);
@@ -190,10 +191,10 @@ protected:
uint32_t _polyphony;
std::set<BlockImpl*> _providers; ///< Blocks connected to this one's input ports
std::set<BlockImpl*> _dependants; ///< Blocks this one's output ports are connected to
+ Mark _mark; ///< Mark for graph compilation algorithm
bool _polyphonic;
bool _activated;
bool _enabled;
- bool _traversed; ///< Flag for process order algorithm
};
} // namespace Server