Dispatcher-Pipeline: create hook for self-validation

...later to be extended into the render nodes network
This commit is contained in:
Fischlurch 2023-06-12 01:07:53 +02:00
parent 0933d2bba8
commit bf3e612c55
5 changed files with 48 additions and 17 deletions

View file

@ -92,6 +92,13 @@ namespace engine {
or not action_; or not action_;
} }
bool
isValid() const
{
return true; ///////////////////////////////////////////////////////////////////////TICKET #826 : ProcNode groundwork; integrate self-validation of render network
}
HashVal HashVal
getPipelineIdentity() const getPipelineIdentity() const
{ {

View file

@ -46,6 +46,7 @@
#include "lib/linked-elements.hpp" #include "lib/linked-elements.hpp"
#include "lib/iter-adapter.hpp" #include "lib/iter-adapter.hpp"
#include "lib/itertools.hpp" #include "lib/itertools.hpp"
#include "lib/util-foreach.hpp"
#include "lib/meta/tuple-helper.hpp" #include "lib/meta/tuple-helper.hpp"
#include "lib/meta/trait.hpp" #include "lib/meta/trait.hpp"
#include "lib/util.hpp" #include "lib/util.hpp"
@ -113,7 +114,7 @@ using lib::LUID;
JobFunctor& jobFunctor; JobFunctor& jobFunctor;
ExitNode const& exitNode; ExitNode const& exitNode;
InvocationInstanceID invocationSeed; InvocationInstanceID invocationSeed;
Prerequisites requirements{}; Prerequisites prerequisites{};
Provision (JobFunctor& func, ExitNode const& node, HashVal seed =0) Provision (JobFunctor& func, ExitNode const& node, HashVal seed =0)
: jobFunctor{func} : jobFunctor{func}
@ -153,7 +154,7 @@ using lib::LUID;
getPrerequisites () const getPrerequisites () const
{ {
return lib::transformIterator (this->empty()? Prerequisites::const_iterator() return lib::transformIterator (this->empty()? Prerequisites::const_iterator()
: provision_.requirements.begin() : provision_.prerequisites.begin()
,[](Prerequisite const& prq) -> JobTicket const& ,[](Prerequisite const& prq) -> JobTicket const&
{ {
return prq.prereqTicket; return prq.prereqTicket;
@ -172,8 +173,11 @@ using lib::LUID;
{ {
if (empty()) return false; if (empty()) return false;
TODO ("validity self check"); InvocationInstanceID empty; /////////////////////////////////////////////////////////////////////TICKET #1287 : temporary workaround until we get rid of the C base structs
return true; 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: protected:
@ -307,7 +311,7 @@ using lib::LUID;
JobFunctor& func = exitNode.getInvocationFunctor(); JobFunctor& func = exitNode.getInvocationFunctor();
Provision provisionSpec{func, exitNode, invoSeed}; Provision provisionSpec{func, exitNode, invoSeed};
for (ExitNode const& preNode: exitNode.getPrerequisites()) 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; return provisionSpec;
} }
@ -333,7 +337,7 @@ using lib::LUID;
JobTicket::discoverPrerequisites (uint channelNr) const JobTicket::discoverPrerequisites (uint channelNr) const
{ {
return empty()? ExplorationState() return empty()? ExplorationState()
: ExplorationState (util::unConst(provision_).requirements); : ExplorationState (util::unConst(provision_).prerequisites);
} }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 : likely to become obsolete /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 : likely to become obsolete

View file

@ -6,7 +6,7 @@ return: 0
END END
PLANNED "A Segment in the Fixture" FixtureSegment_test <<END TEST "A Segment in the Fixture" FixtureSegment_test <<END
return: 0 return: 0
END END

View file

@ -54,7 +54,6 @@ namespace test {
* @test Verify properties and behaviour of a single Segment in the Segmentation * @test Verify properties and behaviour of a single Segment in the Segmentation
* - construction of a mocked Segment * - construction of a mocked Segment
* - on-demand allocation of a JobTicket for a ModelPort(index) * - on-demand allocation of a JobTicket for a ModelPort(index)
* - TODO
* @see steam::fixture::Segment * @see steam::fixture::Segment
* @see JobPlanningSetup_test * @see JobPlanningSetup_test
* @see MockSupport_test * @see MockSupport_test

View file

@ -74266,12 +74266,12 @@ Date:&#160;&#160;&#160;Thu Apr 20 18:53:17 2023 +0200<br/>
</node> </node>
</node> </node>
</node> </node>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1685989418199" ID="ID_1214082390" MODIFIED="1685989432582" TEXT="Mock-Repr&#xe4;sentation f&#xfc;r Exit-Node bereitstellen"> <node COLOR="#338800" CREATED="1685989418199" ID="ID_1214082390" MODIFIED="1686524477993" TEXT="Mock-Repr&#xe4;sentation f&#xfc;r Exit-Node bereitstellen">
<icon BUILTIN="flag-yellow"/> <icon BUILTIN="button_ok"/>
<node CREATED="1685989458554" ID="ID_577122835" MODIFIED="1685989469824" TEXT="diese kann sich im Lauf der Zeit noch &#xe4;ndern"> <node CREATED="1685989458554" ID="ID_577122835" MODIFIED="1685989469824" TEXT="diese kann sich im Lauf der Zeit noch &#xe4;ndern">
<icon BUILTIN="yes"/> <icon BUILTIN="yes"/>
</node> </node>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1685989471022" ID="ID_1045668645" MODIFIED="1685989599678" TEXT="erst einmal gen&#xfc;gt es, da&#xdf; jedes gemockte Segment da einen Eintrag hat"> <node COLOR="#338800" CREATED="1685989471022" ID="ID_1045668645" MODIFIED="1686524466583" TEXT="erst einmal gen&#xfc;gt es, da&#xdf; jedes gemockte Segment da einen Eintrag hat">
<richcontent TYPE="NOTE"><html> <richcontent TYPE="NOTE"><html>
<head> <head>
@ -74285,7 +74285,22 @@ Date:&#160;&#160;&#160;Thu Apr 20 18:53:17 2023 +0200<br/>
</p> </p>
</body> </body>
</html></richcontent> </html></richcontent>
<icon BUILTIN="flag-yellow"/> <icon BUILTIN="button_ok"/>
</node>
<node COLOR="#435e98" CREATED="1686524492032" ID="ID_1332592177" MODIFIED="1686524561638" TEXT="ExitNode kann vorl&#xe4;ufig einfach so konstruiert werden">
<richcontent TYPE="NOTE"><html>
<head>
</head>
<body>
<p>
...da aktuell noch keine Verbindung zum Render-Nodes-Network besteht...
</p>
<p>
(das hei&#223;t, das Problem mit den Mocks verschiebe ich in die Zukunft)
</p>
</body>
</html></richcontent>
</node> </node>
</node> </node>
</node> </node>
@ -74300,7 +74315,7 @@ Date:&#160;&#160;&#160;Thu Apr 20 18:53:17 2023 +0200<br/>
<node COLOR="#338800" CREATED="1685990173459" ID="ID_920554071" MODIFIED="1686498551489" TEXT="im Segment einen indizierten Zugriff vorsehen"> <node COLOR="#338800" CREATED="1685990173459" ID="ID_920554071" MODIFIED="1686498551489" TEXT="im Segment einen indizierten Zugriff vorsehen">
<icon BUILTIN="button_ok"/> <icon BUILTIN="button_ok"/>
</node> </node>
<node COLOR="#338800" CREATED="1686000316132" ID="ID_826544806" LINK="#ID_1237481687" MODIFIED="1686498909689" TEXT="Kopplung per &#xbb;NodeGraphAttachment&#xab;"> <node COLOR="#338800" CREATED="1686000316132" FOLDED="true" ID="ID_826544806" LINK="#ID_1237481687" MODIFIED="1686498909689" TEXT="Kopplung per &#xbb;NodeGraphAttachment&#xab;">
<linktarget COLOR="#656486" DESTINATION="ID_826544806" ENDARROW="Default" ENDINCLINATION="469;-18;" ID="Arrow_ID_1372033454" SOURCE="ID_551644524" STARTARROW="None" STARTINCLINATION="487;30;"/> <linktarget COLOR="#656486" DESTINATION="ID_826544806" ENDARROW="Default" ENDINCLINATION="469;-18;" ID="Arrow_ID_1372033454" SOURCE="ID_551644524" STARTARROW="None" STARTINCLINATION="487;30;"/>
<icon BUILTIN="button_ok"/> <icon BUILTIN="button_ok"/>
<node COLOR="#338800" CREATED="1686008339600" HGAP="28" ID="ID_181839329" MODIFIED="1686092787399" TEXT="Dummy-Implementierung anlegen" VSHIFT="13"> <node COLOR="#338800" CREATED="1686008339600" HGAP="28" ID="ID_181839329" MODIFIED="1686092787399" TEXT="Dummy-Implementierung anlegen" VSHIFT="13">
@ -74516,7 +74531,7 @@ Date:&#160;&#160;&#160;Thu Apr 20 18:53:17 2023 +0200<br/>
</node> </node>
</node> </node>
</node> </node>
<node COLOR="#338800" CREATED="1686089743535" ID="ID_1592596965" MODIFIED="1686498536536" TEXT="JobTicket-Erzeugung (vorl&#xe4;ufig) endg&#xfc;litig implementieren"> <node COLOR="#338800" CREATED="1686089743535" FOLDED="true" ID="ID_1592596965" MODIFIED="1686498536536" TEXT="JobTicket-Erzeugung (vorl&#xe4;ufig) endg&#xfc;litig implementieren">
<icon BUILTIN="button_ok"/> <icon BUILTIN="button_ok"/>
<node COLOR="#5b280f" CREATED="1686089827509" ID="ID_213320277" MODIFIED="1686270676731" TEXT="Spec-Erzeugung in das Segment verlagern"> <node COLOR="#5b280f" CREATED="1686089827509" ID="ID_213320277" MODIFIED="1686270676731" TEXT="Spec-Erzeugung in das Segment verlagern">
<icon BUILTIN="button_cancel"/> <icon BUILTIN="button_cancel"/>
@ -74630,14 +74645,20 @@ Date:&#160;&#160;&#160;Thu Apr 20 18:53:17 2023 +0200<br/>
<node CREATED="1686520353527" ID="ID_1138778172" MODIFIED="1686520370009" TEXT="es k&#xf6;nnte ja auch der Hash==0 sein"/> <node CREATED="1686520353527" ID="ID_1138778172" MODIFIED="1686520370009" TEXT="es k&#xf6;nnte ja auch der Hash==0 sein"/>
</node> </node>
</node> </node>
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1686500296179" ID="ID_988077733" MODIFIED="1686520404258" TEXT="neue L&#xf6;sung f&#xfc;r Validity self-check"> <node COLOR="#338800" CREATED="1686500296179" ID="ID_988077733" MODIFIED="1686524305639" TEXT="neue L&#xf6;sung f&#xfc;r Validity self-check">
<icon BUILTIN="pencil"/> <icon BUILTIN="button_ok"/>
<node COLOR="#338800" CREATED="1686524307537" ID="ID_873423981" MODIFIED="1686524331678" TEXT="rekursiv die Prerequisites pr&#xfc;fen">
<icon BUILTIN="button_ok"/>
</node>
<node COLOR="#338800" CREATED="1686524319479" ID="ID_1164062060" MODIFIED="1686524330865" TEXT="self-check in ExitNode anlegen">
<icon BUILTIN="button_ok"/>
</node>
</node> </node>
</node> </node>
<node COLOR="#338800" CREATED="1686092906718" HGAP="35" ID="ID_1605426517" MODIFIED="1686450454254" TEXT="FixtureSegment_test" VSHIFT="-3"> <node COLOR="#338800" CREATED="1686092906718" HGAP="35" ID="ID_1605426517" MODIFIED="1686450454254" TEXT="FixtureSegment_test" VSHIFT="-3">
<linktarget COLOR="#5aec6d" DESTINATION="ID_1605426517" ENDARROW="Default" ENDINCLINATION="-104;-6;" ID="Arrow_ID_658388334" SOURCE="ID_31746915" STARTARROW="None" STARTINCLINATION="570;-91;"/> <linktarget COLOR="#5aec6d" DESTINATION="ID_1605426517" ENDARROW="Default" ENDINCLINATION="-104;-6;" ID="Arrow_ID_658388334" SOURCE="ID_31746915" STARTARROW="None" STARTINCLINATION="570;-91;"/>
<icon BUILTIN="button_ok"/> <icon BUILTIN="button_ok"/>
<node COLOR="#435e98" CREATED="1686361157528" ID="ID_565360581" MODIFIED="1686450400722" TEXT="SEGFAULT"> <node COLOR="#435e98" CREATED="1686361157528" FOLDED="true" ID="ID_565360581" MODIFIED="1686450400722" TEXT="SEGFAULT">
<icon BUILTIN="broken-line"/> <icon BUILTIN="broken-line"/>
<node CREATED="1686361493991" ID="ID_423058577" MODIFIED="1686361526825" TEXT="tritt nicht bei jedem Lauf auf &#x27f9; vermutlich dangling pointer"/> <node CREATED="1686361493991" ID="ID_423058577" MODIFIED="1686361526825" TEXT="tritt nicht bei jedem Lauf auf &#x27f9; vermutlich dangling pointer"/>
<node CREATED="1686361820600" ID="ID_780766515" MODIFIED="1686361835540"> <node CREATED="1686361820600" ID="ID_780766515" MODIFIED="1686361835540">