From bf3e612c55a42fae7a41acad26fd5da3dd365476 Mon Sep 17 00:00:00 2001
From: Ichthyostega
Date: Mon, 12 Jun 2023 01:07:53 +0200
Subject: [PATCH] Dispatcher-Pipeline: create hook for self-validation
...later to be extended into the render nodes network
---
src/steam/engine/exit-node.hpp | 7 ++++
src/steam/engine/job-ticket.hpp | 16 +++++---
tests/46fixture.tests | 2 +-
.../steam/fixture/fixture-segment-test.cpp | 1 -
wiki/thinkPad.ichthyo.mm | 39 ++++++++++++++-----
5 files changed, 48 insertions(+), 17 deletions(-)
diff --git a/src/steam/engine/exit-node.hpp b/src/steam/engine/exit-node.hpp
index e5fadc3d0..ed746c13c 100644
--- a/src/steam/engine/exit-node.hpp
+++ b/src/steam/engine/exit-node.hpp
@@ -92,6 +92,13 @@ namespace engine {
or not action_;
}
+ bool
+ isValid() const
+ {
+ return true; ///////////////////////////////////////////////////////////////////////TICKET #826 : ProcNode groundwork; integrate self-validation of render network
+ }
+
+
HashVal
getPipelineIdentity() const
{
diff --git a/src/steam/engine/job-ticket.hpp b/src/steam/engine/job-ticket.hpp
index 2c1edfdb3..2ff9eaf02 100644
--- a/src/steam/engine/job-ticket.hpp
+++ b/src/steam/engine/job-ticket.hpp
@@ -46,6 +46,7 @@
#include "lib/linked-elements.hpp"
#include "lib/iter-adapter.hpp"
#include "lib/itertools.hpp"
+#include "lib/util-foreach.hpp"
#include "lib/meta/tuple-helper.hpp"
#include "lib/meta/trait.hpp"
#include "lib/util.hpp"
@@ -113,7 +114,7 @@ using lib::LUID;
JobFunctor& jobFunctor;
ExitNode const& exitNode;
InvocationInstanceID invocationSeed;
- Prerequisites requirements{};
+ Prerequisites prerequisites{};
Provision (JobFunctor& func, ExitNode const& node, HashVal seed =0)
: jobFunctor{func}
@@ -153,7 +154,7 @@ using lib::LUID;
getPrerequisites () const
{
return lib::transformIterator (this->empty()? Prerequisites::const_iterator()
- : provision_.requirements.begin()
+ : provision_.prerequisites.begin()
,[](Prerequisite const& prq) -> JobTicket const&
{
return prq.prereqTicket;
@@ -172,8 +173,11 @@ using lib::LUID;
{
if (empty()) return false;
- TODO ("validity self check");
- return true;
+ InvocationInstanceID empty; /////////////////////////////////////////////////////////////////////TICKET #1287 : temporary workaround until we get rid of the C base structs
+ return not lumiera_invokey_eq (&util::unConst(provision_).invocationSeed, &empty)
+ and provision_.exitNode.isValid()
+ and util::and_all (provision_.prerequisites
+ ,[](auto& pq){ return pq.prereqTicket.isValid(); });
}
protected:
@@ -307,7 +311,7 @@ using lib::LUID;
JobFunctor& func = exitNode.getInvocationFunctor();
Provision provisionSpec{func, exitNode, invoSeed};
for (ExitNode const& preNode: exitNode.getPrerequisites())
- provisionSpec.requirements.emplace(preNode, allocTicket); //////////////////////////////////////////TICKET #1292 : need to pass in generic Allocator as argument
+ provisionSpec.prerequisites.emplace(preNode, allocTicket); //////////////////////////////////////////TICKET #1292 : need to pass in generic Allocator as argument
return provisionSpec;
}
@@ -333,7 +337,7 @@ using lib::LUID;
JobTicket::discoverPrerequisites (uint channelNr) const
{
return empty()? ExplorationState()
- : ExplorationState (util::unConst(provision_).requirements);
+ : ExplorationState (util::unConst(provision_).prerequisites);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 : likely to become obsolete
diff --git a/tests/46fixture.tests b/tests/46fixture.tests
index b22666aa4..2d8720ea2 100644
--- a/tests/46fixture.tests
+++ b/tests/46fixture.tests
@@ -6,7 +6,7 @@ return: 0
END
-PLANNED "A Segment in the Fixture" FixtureSegment_test <
-
-
+
+
-
+
@@ -74285,7 +74285,22 @@ Date: Thu Apr 20 18:53:17 2023 +0200
-
+
+
+
+
+
+
+
+
+
+ ...da aktuell noch keine Verbindung zum Render-Nodes-Network besteht...
+
+
+ (das heißt, das Problem mit den Mocks verschiebe ich in die Zukunft)
+
+
+
@@ -74300,7 +74315,7 @@ Date: Thu Apr 20 18:53:17 2023 +0200
-
+
@@ -74516,7 +74531,7 @@ Date: Thu Apr 20 18:53:17 2023 +0200
-
+
@@ -74630,14 +74645,20 @@ Date: Thu Apr 20 18:53:17 2023 +0200
-
-
+
+
+
+
+
+
+
+
-
+