Invocation: also invoke all these nodes
...while this is not the main objective of this test case, and another test will focus on invocation with full-fledged `TestFrame` buffers and hash computation... ...it is still a nice achievement to see that these simple algebraic operations used for demonstration can actually be invoked in the whole connected network :-)
This commit is contained in:
parent
d54dbc93df
commit
f767cce77b
5 changed files with 127 additions and 10 deletions
|
|
@ -21,7 +21,8 @@
|
|||
** provides a naive self-contained implementation suitable for demonstration and test.
|
||||
** @todo who is responsible for setup of the services for the actual render engine?
|
||||
** Might be closely related to brining up façade interfaces.
|
||||
** @todo WIP-WIP 10/2024 provide render node structures
|
||||
** @todo WIP-WIP 2/2025 provide actual service implementation and find a way
|
||||
** how to populate the Facilities with these actual services...
|
||||
**
|
||||
** @see engine-ctx-facilities.hpp implementation
|
||||
** @see buffer-provider.hpp
|
||||
|
|
|
|||
|
|
@ -267,7 +267,15 @@ namespace engine {
|
|||
throw error::Logic ("Attempt to emit a buffer not known to this BufferProvider"
|
||||
, LUMIERA_ERROR_BUFFER_MANAGEMENT);
|
||||
diagn::BlockPool& pool = getBlockPoolFor (typeID);
|
||||
outSeq_.manage (pool.transferResponsibility (block4buffer));
|
||||
Block* active = pool.transferResponsibility (block4buffer);
|
||||
if (active)
|
||||
outSeq_.manage (active);
|
||||
else
|
||||
if (block4buffer->was_closed())
|
||||
WARN (proc_mem, "Attempt to emit() an already closed buffer.");
|
||||
else
|
||||
WARN (proc_mem, "Attempt to emit() a buffer not found in active pool. "
|
||||
"Maybe duplicate call to emit()?");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -238,6 +238,8 @@ namespace engine {
|
|||
* @tparam PROT Prototype to generate a Feed or invocation adapter to invoke
|
||||
* @remark in the standard case, PROT is a FeedManifold<FUN>::Prototype and
|
||||
* thus embeds the processing-functor and possibly a parameter-functor
|
||||
* @todo 2/2025 nothing is implemented yet for specific buffer / type config.
|
||||
* All type slots are filled with the default provider from EngineCtx.
|
||||
*/
|
||||
template<class POL, class PROT>
|
||||
struct WeavingBuilder
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
#include "steam/engine/proc-node.hpp"
|
||||
#include "steam/engine/node-builder.hpp"
|
||||
#include "steam/engine/test-rand-ontology.hpp"
|
||||
#include "steam/engine/diagnostic-buffer-provider.hpp"
|
||||
#include "lib/test/diagnostic-output.hpp"/////////////////TODO
|
||||
#include "lib/util.hpp"
|
||||
|
||||
|
|
@ -279,6 +280,36 @@ namespace test {
|
|||
CHECK (watch(mix).watchPort(0).srcPorts()[1] == watch(mix).watchLead(1).ports()[0]);
|
||||
CHECK (watch(mix).watchPort(1).srcPorts()[1] == watch(mix).watchLead(1).ports()[1]);
|
||||
CHECK (watch(mix).watchPort(2).srcPorts()[1] == watch(mix).watchLead(1).ports()[2]);
|
||||
|
||||
|
||||
//________________________________________________________
|
||||
// for sake of completeness: all these nodes can be invoked
|
||||
|
||||
BufferProvider& provider = DiagnosticBufferProvider::build();
|
||||
auto invoke = [&](ProcNode& node, uint port)
|
||||
{ // Sequence to invoke a Node...
|
||||
BuffHandle buff = provider.lockBufferFor<int> (-55);
|
||||
CHECK (-55 == buff.accessAs<int>());
|
||||
buff = node.pull (port, buff, Time::ZERO, ProcessKey{0});
|
||||
int result = buff.accessAs<int>();
|
||||
buff.release();
|
||||
return result;
|
||||
};
|
||||
|
||||
// node|port
|
||||
CHECK (invoke (n1s, 0 ) == 5);
|
||||
CHECK (invoke (n1s, 1 ) == 23);
|
||||
|
||||
CHECK (invoke (n1f, 0 ) == 5+1);
|
||||
CHECK (invoke (n1f, 1 ) == 23+1);
|
||||
|
||||
CHECK (invoke (n2s, 0 ) == 7);
|
||||
CHECK (invoke (n2s, 1 ) == 13);
|
||||
CHECK (invoke (n2s, 2 ) == 17);
|
||||
|
||||
CHECK (invoke (mix, 0 ) == (5+1 + 7 )/2);
|
||||
CHECK (invoke (mix, 1 ) == (23+1 + 13)/2);
|
||||
CHECK (invoke (mix, 2 ) == (23+1 + 17)/2);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -94451,10 +94451,10 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
</html></richcontent>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1720546521352" ID="ID_1680202759" MODIFIED="1735415902955" TEXT="ein einfaches WeavingPattern für einen 1:1 Aufruf">
|
||||
<node COLOR="#338800" CREATED="1720546521352" ID="ID_1680202759" MODIFIED="1739064566680" TEXT="ein einfaches WeavingPattern für einen 1:1 Aufruf">
|
||||
<linktarget COLOR="#4033e3" DESTINATION="ID_1680202759" ENDARROW="Default" ENDINCLINATION="-2222;-127;" ID="Arrow_ID_607031123" SOURCE="ID_882727048" STARTARROW="None" STARTINCLINATION="2266;131;"/>
|
||||
<linktarget COLOR="#ff6936" DESTINATION="ID_1680202759" ENDARROW="Default" ENDINCLINATION="-884;1900;" ID="Arrow_ID_1934503032" SOURCE="ID_313412689" STARTARROW="None" STARTINCLINATION="789;48;"/>
|
||||
<icon BUILTIN="pencil"/>
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1720567224202" ID="ID_933061351" MODIFIED="1720567366517" TEXT="Buffer-Konstruktor-Spec bereitstellen">
|
||||
<arrowlink COLOR="#6555a4" DESTINATION="ID_33806321" ENDARROW="Default" ENDINCLINATION="-432;713;" ID="Arrow_ID_1589842372" STARTARROW="None" STARTINCLINATION="-186;-18;"/>
|
||||
<icon BUILTIN="pencil"/>
|
||||
|
|
@ -97381,6 +97381,10 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#aed8c1" COLOR="#338800" CREATED="1736092119715" HGAP="-15" ID="ID_604652229" MODIFIED="1739065165359" TEXT="Erfolg: kann damit einfaches Node-Network aufbauen und aufrufen" VSHIFT="41">
|
||||
<arrowlink COLOR="#339eb9" DESTINATION="ID_1031026362" ENDARROW="Default" ENDINCLINATION="1401;0;" ID="Arrow_ID_273893015" STARTARROW="None" STARTINCLINATION="1540;66;"/>
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
</node>
|
||||
<node COLOR="#338800" CREATED="1720546521352" ID="ID_348960119" MODIFIED="1736107489934" TEXT="ein WeavingPattern für erweiterte Parameter-Auswertung">
|
||||
<linktarget COLOR="#50749b" DESTINATION="ID_348960119" ENDARROW="Default" ENDINCLINATION="220;-954;" ID="Arrow_ID_967296024" SOURCE="ID_1908488051" STARTARROW="None" STARTINCLINATION="78;483;"/>
|
||||
|
|
@ -97879,7 +97883,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
</node>
|
||||
<node CREATED="1721003586265" ID="ID_833935002" MODIFIED="1721003607658" TEXT="und obendrauf kommen nochmal jeweils spezielle Konfigurations-APIs"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1721000066150" ID="ID_1111138525" MODIFIED="1734059986870" TEXT="auch dieses per Prototyping ausarbeiten">
|
||||
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1721000066150" ID="ID_1111138525" MODIFIED="1739065017313" TEXT="auch dieses per Prototyping ausarbeiten">
|
||||
<linktarget COLOR="#b90172" DESTINATION="ID_1111138525" ENDARROW="Default" ENDINCLINATION="2;-47;" ID="Arrow_ID_248579830" SOURCE="ID_1888404885" STARTARROW="None" STARTINCLINATION="-4;46;"/>
|
||||
<linktarget COLOR="#ff6936" DESTINATION="ID_1111138525" ENDARROW="Default" ENDINCLINATION="-884;1900;" ID="Arrow_ID_456241753" SOURCE="ID_1138984645" STARTARROW="None" STARTINCLINATION="692;47;"/>
|
||||
<icon BUILTIN="yes"/>
|
||||
|
|
@ -104017,12 +104021,66 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension)
|
|||
<node COLOR="#338800" CREATED="1728785939337" ID="ID_642847753" MODIFIED="1736120593064" TEXT="einfachste Berechnung direkt verifizieren">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1739055425419" ID="ID_1573345464" MODIFIED="1739055598085" TEXT="schon mal einen einfachen verketteten Aufruf durchführen">
|
||||
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1739055425419" ID="ID_1573345464" MODIFIED="1739065042416" TEXT="schon mal einen einfachen verketteten Aufruf durchführen">
|
||||
<arrowlink COLOR="#963260" DESTINATION="ID_159987338" ENDARROW="Default" ENDINCLINATION="-152;10;" ID="Arrow_ID_371475437" STARTARROW="None" STARTINCLINATION="236;-15;"/>
|
||||
<linktarget COLOR="#c6074b" DESTINATION="ID_1573345464" ENDARROW="Default" ENDINCLINATION="-393;16;" ID="Arrow_ID_1069316" SOURCE="ID_704199650" STARTARROW="None" STARTINCLINATION="446;-9;"/>
|
||||
<linktarget COLOR="#0747c6" DESTINATION="ID_1573345464" ENDARROW="Default" ENDINCLINATION="-393;16;" ID="Arrow_ID_1069316" SOURCE="ID_704199650" STARTARROW="None" STARTINCLINATION="1087;0;"/>
|
||||
<icon BUILTIN="flag-pink"/>
|
||||
<node BACKGROUND_COLOR="#fafe99" COLOR="#fa002a" CREATED="1739056024968" ID="ID_605383318" MODIFIED="1739056038505" TEXT="Probleme mit Buffer-Weitergabe">
|
||||
<icon BUILTIN="broken-line"/>
|
||||
<node CREATED="1739059574979" ID="ID_1006927648" MODIFIED="1739059594496" TEXT="wir verwenden bisher (hard-wired) den TrackingHeapBlockProvider">
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
</node>
|
||||
<node COLOR="#435e98" CREATED="1739059549908" ID="ID_961458469" MODIFIED="1739059718205">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
<font face="Monospaced">NodeBuilder_test::<b>build_connectedNodes</b>()</font>
|
||||
</p>
|
||||
<p>
|
||||
da hat das aber bereits funktioniert...
|
||||
</p>
|
||||
</body>
|
||||
</html></richcontent>
|
||||
<icon BUILTIN="idea"/>
|
||||
<node CREATED="1739059597238" ID="ID_62981192" MODIFIED="1739059606864" TEXT="dort aber nur ein einziger Call"/>
|
||||
<node CREATED="1739059607954" ID="ID_44084676" MODIFIED="1739059617359" TEXT="und auch nur jeweils ein Port"/>
|
||||
</node>
|
||||
<node COLOR="#435e98" CREATED="1739062384277" ID="ID_1699124032" MODIFIED="1739063365824" TEXT="Konsistenzfehler im TrackingHeapBlockProvider">
|
||||
<icon BUILTIN="broken-line"/>
|
||||
<node BACKGROUND_COLOR="#e0ceaa" COLOR="#690f14" CREATED="1739062416680" ID="ID_309644792" MODIFIED="1739063368660" TEXT="Tracking nicht vorbereitet auf Protokoll-Verletzung">
|
||||
<icon BUILTIN="broken-line"/>
|
||||
<node COLOR="#338800" CREATED="1739063371088" ID="ID_1692277739" MODIFIED="1739063385416" TEXT="Fix: Warnung ausgeben und ignorieren">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1739062443813" ID="ID_345314364" MODIFIED="1739062462502" TEXT="das Weiterschieben der Tracking-Info verursacht ASSERTION-Failure"/>
|
||||
<node BACKGROUND_COLOR="#f8f1cb" COLOR="#a50125" CREATED="1739062464730" ID="ID_1648777322" MODIFIED="1739063334543" TEXT="die eigentliche Fehlermeldung wird daher überhaupt nicht erreicht">
|
||||
<arrowlink COLOR="#fefed1" DESTINATION="ID_783079164" ENDARROW="Default" ENDINCLINATION="193;10;" ID="Arrow_ID_330692053" STARTARROW="None" STARTINCLINATION="44;65;"/>
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1739062506548" ID="ID_783079164" MODIFIED="1739063325785" TEXT="eigentliches Problem: unerlaubter Buffer-reuse">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
ich wollte einen schnellen Test coden und hab daher immer wieder den gleichen Output-Buffer reingegeben; das ist so nicht erlaubt, denn der erste Aufruf hat diesen in den EMITTED-State gebracht.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
<linktarget COLOR="#fefed1" DESTINATION="ID_783079164" ENDARROW="Default" ENDINCLINATION="193;10;" ID="Arrow_ID_330692053" SOURCE="ID_1648777322" STARTARROW="None" STARTINCLINATION="44;65;"/>
|
||||
<icon BUILTIN="idea"/>
|
||||
</node>
|
||||
</node>
|
||||
<node COLOR="#338800" CREATED="1739065138984" ID="ID_1674898925" LINK="#ID_1500343557" MODIFIED="1739065290423" TEXT="NodeLink_test::build_connected_nodes">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node BACKGROUND_COLOR="#174956" COLOR="#8dfd49" CREATED="1735016105632" HGAP="114" ID="ID_1031026362" MODIFIED="1739065165359" STYLE="bubble" TEXT="zweiter Erfolg" VSHIFT="41">
|
||||
<edge COLOR="#61fe5b"/>
|
||||
<linktarget COLOR="#339eb9" DESTINATION="ID_1031026362" ENDARROW="Default" ENDINCLINATION="1401;0;" ID="Arrow_ID_273893015" SOURCE="ID_604652229" STARTARROW="None" STARTINCLINATION="1540;66;"/>
|
||||
<font NAME="SansSerif" SIZE="17"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
|
|
@ -107089,6 +107147,22 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension)
|
|||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node COLOR="#338800" CREATED="1739065230388" ID="ID_1500343557" MODIFIED="1739065253177" TEXT="die eingebauten Dummy-Funktionen rechnen auch korrekt">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node COLOR="#435e98" CREATED="1739065320744" ID="ID_1239270101" MODIFIED="1739065604712" TEXT="das fällt zwar nur nebenbei mit ab">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
...weil es dämlich wäre, da so diverse (auch inhaltlich sinnvolle) Funktionen zu definieren, dann aber überhaupt nicht aufzurufen. Zumal diese Funktionen noch so einfach sind, daß man die Aufrufe direkt im Debugger nachvollziehen kann...
|
||||
</p>
|
||||
</body>
|
||||
</html></richcontent>
|
||||
</node>
|
||||
<node COLOR="#435e98" CREATED="1739065331502" ID="ID_1777765902" LINK="#ID_1031026362" MODIFIED="1739065475861" TEXT="vollzieht aber bereits einen weiterern Integrations-Schritt">
|
||||
<arrowlink COLOR="#47619f" DESTINATION="ID_1199569608" ENDARROW="Default" ENDINCLINATION="-289;-816;" ID="Arrow_ID_837710444" STARTARROW="None" STARTINCLINATION="-60;3;"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1719185907166" ID="ID_103991417" MODIFIED="1736198340899" TEXT="Implementierung treiben">
|
||||
|
|
@ -107331,9 +107405,10 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension)
|
|||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1719964462740" ID="ID_1199569608" MODIFIED="1729957896038" TEXT="muß einen Prototyp bereits bis in die Invocation durchführen">
|
||||
<node BACKGROUND_COLOR="#bdbdde" COLOR="#4c4398" CREATED="1719964462740" ID="ID_1199569608" MODIFIED="1739065467662" TEXT="muß einen Prototyp bereits bis in die Invocation durchführen">
|
||||
<linktarget COLOR="#5e2f3f" DESTINATION="ID_1199569608" ENDARROW="Default" ENDINCLINATION="-1226;-72;" ID="Arrow_ID_1409703862" SOURCE="ID_495934512" STARTARROW="None" STARTINCLINATION="-302;19;"/>
|
||||
<linktarget COLOR="#ad4f61" DESTINATION="ID_1199569608" ENDARROW="Default" ENDINCLINATION="16;78;" ID="Arrow_ID_1294596979" SOURCE="ID_510878392" STARTARROW="None" STARTINCLINATION="229;11;"/>
|
||||
<linktarget COLOR="#47619f" DESTINATION="ID_1199569608" ENDARROW="Default" ENDINCLINATION="-289;-816;" ID="Arrow_ID_837710444" SOURCE="ID_1777765902" STARTARROW="None" STARTINCLINATION="-60;3;"/>
|
||||
<icon BUILTIN="yes"/>
|
||||
<node BACKGROUND_COLOR="#c8c0b6" COLOR="#435e98" CREATED="1719964569422" ID="ID_886839618" MODIFIED="1730829540845" STYLE="bubble" TEXT="erst mal irgend eine Node irgendwie bauen">
|
||||
<edge COLOR="#fe6f46"/>
|
||||
|
|
@ -107348,9 +107423,9 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension)
|
|||
<edge COLOR="#fe6f46"/>
|
||||
<icon BUILTIN="full-3"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#5e0646" CREATED="1719964597362" ID="ID_704199650" MODIFIED="1739055458080" STYLE="bubble" TEXT="Ende-zu-Ende-Aufruf">
|
||||
<node BACKGROUND_COLOR="#c8c0b6" COLOR="#435e98" CREATED="1719964597362" ID="ID_704199650" MODIFIED="1739065042415" STYLE="bubble" TEXT="Ende-zu-Ende-Aufruf">
|
||||
<edge COLOR="#fe6f46"/>
|
||||
<arrowlink COLOR="#c6074b" DESTINATION="ID_1573345464" ENDARROW="Default" ENDINCLINATION="-393;16;" ID="Arrow_ID_1069316" STARTARROW="None" STARTINCLINATION="446;-9;"/>
|
||||
<arrowlink COLOR="#0747c6" DESTINATION="ID_1573345464" ENDARROW="Default" ENDINCLINATION="-393;16;" ID="Arrow_ID_1069316" STARTARROW="None" STARTINCLINATION="1087;0;"/>
|
||||
<icon BUILTIN="full-4"/>
|
||||
</node>
|
||||
</node>
|
||||
|
|
|
|||
Loading…
Reference in a new issue