summaryrefslogtreecommitdiffstats
path: root/src/server/PatchImpl.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-07-31 00:47:40 +0000
committerDavid Robillard <d@drobilla.net>2012-07-31 00:47:40 +0000
commit66ac730782803a47ae4977d2db2407126005f4bd (patch)
treedb31b21dff549897aa5cc730d028913959aa930d /src/server/PatchImpl.cpp
parent88f9a3bf23fc629385978633a8764d74788e1fdc (diff)
downloadingen-66ac730782803a47ae4977d2db2407126005f4bd.tar.gz
ingen-66ac730782803a47ae4977d2db2407126005f4bd.tar.bz2
ingen-66ac730782803a47ae4977d2db2407126005f4bd.zip
Remove rotten parallelism stuff.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4581 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/PatchImpl.cpp')
-rw-r--r--src/server/PatchImpl.cpp79
1 files changed, 2 insertions, 77 deletions
diff --git a/src/server/PatchImpl.cpp b/src/server/PatchImpl.cpp
index 359122fa..ee5ea230 100644
--- a/src/server/PatchImpl.cpp
+++ b/src/server/PatchImpl.cpp
@@ -28,7 +28,6 @@
#include "PatchImpl.hpp"
#include "PatchPlugin.hpp"
#include "PortImpl.hpp"
-#include "ProcessSlave.hpp"
#include "ThreadManager.hpp"
using namespace std;
@@ -154,10 +153,8 @@ PatchImpl::process(ProcessContext& context)
if (_compiled_patch && _compiled_patch->size() > 0) {
// Run all nodes
- if (context.slaves().size() > 0) {
- process_parallel(context);
- } else {
- process_single(context);
+ for (size_t i = 0; i < _compiled_patch->size(); ++i) {
+ (*_compiled_patch)[i].node()->process(context);
}
// Queue any cross-context edges
@@ -171,78 +168,6 @@ PatchImpl::process(ProcessContext& context)
}
void
-PatchImpl::process_parallel(ProcessContext& context)
-{
- size_t n_slaves = context.slaves().size();
-
- CompiledPatch* const cp = _compiled_patch;
-
- /* Start p-1 slaves */
-
- if (n_slaves >= cp->size())
- n_slaves = cp->size()-1;
-
- if (n_slaves > 0) {
- for (size_t i = 0; i < cp->size(); ++i)
- (*cp)[i].node()->reset_input_ready();
-
- for (size_t i = 0; i < n_slaves; ++i)
- context.slaves()[i]->whip(cp, i+1, context);
- }
-
- /* Process ourself until everything is done
- * This is analogous to ProcessSlave::_whipped(), but this is the master
- * (i.e. what the main Jack process thread calls). Where ProcessSlave
- * waits on input, this just skips the node and tries the next, to avoid
- * waiting in the Jack thread which pisses Jack off.
- */
-
- size_t index = 0;
- size_t num_finished = 0; // Number of consecutive finished nodes hit
-
- while (num_finished < cp->size()) {
- CompiledNode& n = (*cp)[index];
-
- if (n.node()->process_lock()) {
- if (n.node()->n_inputs_ready() == n.n_providers()) {
- n.node()->process(context);
-
- /* Signal dependants their input is ready */
- for (uint32_t i = 0; i < n.dependants().size(); ++i)
- n.dependants()[i]->signal_input_ready(context);
-
- ++num_finished;
- } else {
- n.node()->process_unlock();
- num_finished = 0;
- }
- } else {
- if (n.node()->n_inputs_ready() == n.n_providers())
- ++num_finished;
- else
- num_finished = 0;
- }
-
- index = (index + 1) % cp->size();
- }
-
- /* Tell slaves we're done in case we beat them, and pray they're
- * really done by the start of next cycle.
- * FIXME: This probably breaks (race) at extremely small nframes where
- * ingen is the majority of the DSP load.
- */
- for (uint32_t i = 0; i < n_slaves; ++i)
- context.slaves()[i]->finish();
-}
-
-void
-PatchImpl::process_single(ProcessContext& context)
-{
- for (size_t i = 0; i < _compiled_patch->size(); ++i)
- (*_compiled_patch)[i].node()->process(context);
-}
-
-void
PatchImpl::set_buffer_size(Context& context,
BufferFactory& bufs,
LV2_URID type,