diff --git a/src/steam/engine/engine-ctx.hpp b/src/steam/engine/engine-ctx.hpp index dffb43faa..863e59a09 100644 --- a/src/steam/engine/engine-ctx.hpp +++ b/src/steam/engine/engine-ctx.hpp @@ -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 diff --git a/src/steam/engine/tracking-heap-block-provider.cpp b/src/steam/engine/tracking-heap-block-provider.cpp index 18e5d4b5d..3c2a2cbc7 100644 --- a/src/steam/engine/tracking-heap-block-provider.cpp +++ b/src/steam/engine/tracking-heap-block-provider.cpp @@ -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()?"); } diff --git a/src/steam/engine/weaving-pattern-builder.hpp b/src/steam/engine/weaving-pattern-builder.hpp index e3deb2415..b1885b592 100644 --- a/src/steam/engine/weaving-pattern-builder.hpp +++ b/src/steam/engine/weaving-pattern-builder.hpp @@ -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::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 struct WeavingBuilder diff --git a/tests/core/steam/engine/node-link-test.cpp b/tests/core/steam/engine/node-link-test.cpp index da7abf14c..4626c21f9 100644 --- a/tests/core/steam/engine/node-link-test.cpp +++ b/tests/core/steam/engine/node-link-test.cpp @@ -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 (-55); + CHECK (-55 == buff.accessAs()); + buff = node.pull (port, buff, Time::ZERO, ProcessKey{0}); + int result = buff.accessAs(); + 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); } diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index fdcff44bc..1ff5cd15a 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -94451,10 +94451,10 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + - + @@ -97381,6 +97381,10 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
+ + + +
@@ -97879,7 +97883,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + @@ -104017,12 +104021,66 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) - + - + + + + + + + + +

+ NodeBuilder_test::build_connectedNodes() +

+

+ da hat das aber bereits funktioniert... +

+ +
+ + + + + + + + + + + + + + + + + + + + + + +

+ 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. +

+ + +
+ + +
+
+ + + + + + +
@@ -107089,6 +107147,22 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension)
+ + + + + + +

+ ...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... +

+ +
+
+ + + +
@@ -107331,9 +107405,10 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) - + + @@ -107348,9 +107423,9 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) - + - +