optimisation is to optimistic

Martin Bayer <[email protected]>
Newsgroups gmane.comp.video.gephex.devel
Message-ID <[email protected]>
-> moved to devel

> And add all nonstatic modules and all modules in a cycle to the set of
> "sinks".

--- orig/engine/src/renderer/runtimesystem.cpp
+++ mod/engine/src/renderer/runtimesystem.cpp
@@ -286,11 +286,12 @@
      ModuleControlBlockPtr newBlock ( new ModuleControlBlock(newModule) );

      m_modules[moduleID] = newBlock;
-
-    // no output => module is a sink
-    if (newModule->getOutputs().size() == 0)
+
+    // no output or notdeterministic => module is a sink
+    if (( newModule->getOutputs().size() == 0 ) ||
+       ( !newModule->isDeterministic()) )
        m_sinks.push_front(newBlock);
-
+
  #if (ENGINE_VERBOSITY > 0)
      std::cout << "Added new Module (id " << moduleID << ") of Class "
               << moduleClassName << std::endl;


The cycle test could be added before the graph update. I don't think we
need the cycle test for 0.4. But in 0.5 all deterministic subgraphs will
have cycles.

Martin

_______________________________________________
gephex-devel mailing list
[email protected]
http://lists.gephex.org/mailman/listinfo/gephex-devel
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFCJu5MCm3i57PRsbsRAoesAJ0fMckZRAgfRXmEtOmkR9upg8zqWwCgqiGC
sP3+3jPx64qWWXdnU4CxwvA=
=SRi+
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.