diff --git a/src/steam/engine/dispatcher.cpp b/src/steam/engine/dispatcher.cpp index 7af11b5b5..fdd0ae443 100644 --- a/src/steam/engine/dispatcher.cpp +++ b/src/steam/engine/dispatcher.cpp @@ -40,6 +40,7 @@ namespace engine { FrameSequencer::~FrameSequencer() { } +#if false /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 :: to be refactored... /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1301 : likely to become obsolete /** @todo WIP */ FrameCoord @@ -56,6 +57,7 @@ namespace engine { return dispatcher_->locateRelative (frame, frameOffset); } /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1301 : likely to become obsolete +#endif /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 :: to be refactored... diff --git a/src/steam/engine/dispatcher.hpp b/src/steam/engine/dispatcher.hpp index 3809a4955..b16d1c2d5 100644 --- a/src/steam/engine/dispatcher.hpp +++ b/src/steam/engine/dispatcher.hpp @@ -91,6 +91,7 @@ namespace engine { class Dispatcher : public FrameLocator { +#if false /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 :: to be refactored... /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1301 : obsolete struct JobBuilder { @@ -109,6 +110,7 @@ namespace engine { } }; /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1301 : obsolete +#endif /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 :: to be refactored... struct PipeFrameTick; template @@ -161,6 +163,7 @@ namespace engine { protected: +#if false /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 :: to be refactored... /** core dispatcher operation: based on the coordinates of a reference point, * establish binding frame number, nominal time and real (wall clock) deadline. * @return new FrameCoord record (copy), with the nominal time, frame number @@ -187,6 +190,7 @@ namespace engine { ////////////TODO: remaining issues //////////// - the TimeAnchor needs to be created directly from the JobParameter. No mutable state! //////////// - but this leads to a lot of duplicated Timings records, unless we rewrite the TimeAnchor to be noncopyable and use a Timings const& +#endif /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 :: to be refactored... virtual JobTicket& accessJobTicket (size_t, TimeValue nominalTime) =0; }; diff --git a/src/steam/engine/job-planning.hpp b/src/steam/engine/job-planning.hpp index e07f96adf..f7ff4ecf0 100644 --- a/src/steam/engine/job-planning.hpp +++ b/src/steam/engine/job-planning.hpp @@ -21,40 +21,20 @@ */ /** @file job-planning.hpp - ** The "mechanics" of discovering and planning frame calculation jobs. - ** This is a rather abstract chunk of code, to deal especially with the technicalities - ** of \em organising the discovery of prerequisites and of joining all the discovered operations - ** into a sequence of planning steps. The net result is to present a sequence of job planing - ** to the user, while actually encapsulating a depth-first tree exploration, which proceeds on demand. - ** - ** # participating elements - ** All of these job planning operations are implemented on top of the JobTicket. This is where to look - ** for "actual" implementation code. Here, within this header, the following entities cooperate to - ** create a simple sequence out of this implementation level tasks: - ** - JobPlanningSequence is the entry point for client code: it allows to generate a sequence of jobs - ** - JobPlanning is a view on top of all the collected planning information for a single job - ** - PlanningState is an iterator, successively exposing a sequence of JobPlanning views - ** - steam::engine::expandPrerequisites(JobPlanning const&) is the operation to explore further prerequisite Jobs recursively - ** - PlanningStepGenerator yields the underlying "master beat": a sequence of frame locations to be planned - ** - ** # how the PlanningState (sequence) is advanced - ** PlanningState is an iterator to expose a sequence of JobPlanning elements. On the implementation level, - ** there is always just a single JobPlanning element, which represents the \em current element; this element - ** lives as "state core" within the PlanningState object. Advancing to the next JobPlanning element (i.e. to - ** consider the next job or prerequisite job to be planned for scheduling) is performed through the iteration - ** control API exposed by JobPlanning (the functions `checkPoint()`, `yield()` and `iterNext()`. Actually, - ** these functions are invoked through the depth-first tree exploration performed by JobPlaningSequence. - ** The implementation of these invocations can be found within the IterExplorer strategy - ** lib::iter_explorer::RecursiveSelfIntegration. The net result is - ** - the current element is always accessed through `yield()` - ** - advancing to the next element happens \em either - ** - ** - by invoking `iterNext()` (when processing a sequence of sibling job prerequisites) - ** - by invoking `integrate()` (when starting to explore the next level of children) + ** Aggregation of planning data to generate actual frame calculation jobs. + ** These render jobs are generated periodically by an ongoing process while rendering is underway. + ** For this purpose, each CalcStream of the play/render process operates a RenderDrive with a + ** _job-planning pipeline_, rooted at the »master beat« as defined by the frame grid from the + ** Timings spec of the current render process. This pipeline will assemble the specifications + ** for the render jobs and thereby possibly discover prerequisites, which must be calculated first. + ** From a usage point of view, the _job-planning pipeline_ is an _iterator:_ for each independent + ** calculation step a new JobPlanning record appears at the output side of the pipeline, holding + ** all collected data, sufficient to generate the actual job definition, which can then be + ** handed over to the Scheduler. ** ** @warning as of 4/2023 a complete rework of the Dispatcher is underway ///////////////////////////////////////////TICKET #1275 ** - ** @see DispatcherInterface_test simplified usage examples + ** @see JobPlanning_test ** @see JobTicket ** @see Dispatcher ** @see EngineService @@ -70,8 +50,8 @@ #include "steam/engine/job-ticket.hpp" #include "steam/engine/frame-coord.hpp" #include "lib/time/timevalue.hpp" -#include "lib/iter-explorer.hpp" -#include "lib/iter-adapter.hpp" +//#include "lib/iter-explorer.hpp" +//#include "lib/iter-adapter.hpp" #include "lib/util.hpp" @@ -100,13 +80,11 @@ namespace engine { * on a recursive exploration of the corresponding JobTicket, which acts as * a general blueprint for creating jobs within this segment of the timeline. * - * @remarks on the implementation level, JobPlanning is used as "state core" - * for a PlanningState iterator, to visit and plan subsequently all - * the individual operations necessary to render a timeline chunk. + * @todo WIP-WIP 6/2023 reworking the job-planning pipeline for »PlaybackVerticalSlice« */ class JobPlanning { - JobTicket::ExplorationState plannedOperations_; +// JobTicket::ExplorationState plannedOperations_; FrameCoord point_to_calculate_; public: @@ -117,6 +95,7 @@ namespace engine { JobPlanning() { } +#if false /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 :: to be refactored... /** further job planning can be initiated by continuing off a given previous planning state. * This is how the forks are created, expanding into a multitude of prerequisites for * the job in question. @@ -125,6 +104,7 @@ namespace engine { : plannedOperations_(startingPoint) , point_to_calculate_(requestedFrame) { } +#endif /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 :: to be refactored... // using the standard copy operations @@ -134,15 +114,18 @@ namespace engine { */ operator Job() { +#if false /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 :: to be refactored... if (isnil (plannedOperations_)) throw error::Logic("Attempt to plan a frame-Job based on a missing, " "unspecified, exhausted or superseded job description" ,error::LUMIERA_ERROR_BOTTOM_VALUE); return plannedOperations_->createJobFor (point_to_calculate_); +#endif /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 :: to be refactored... } +#if false /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 :: to be refactored... /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1301 : likely to become obsolete /** build a new JobPlanning object, * set to explore the prerequisites @@ -159,8 +142,6 @@ namespace engine { } /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1301 : likely to become obsolete -#if false /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 :: to be refactored... -#endif /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 :: to be refactored... /** integrate another chain of prerequisites into the current evaluation line. * Further evaluation will start to visit prerequisites from the new starting point, * and return to the current evaluation chain later on exhaustion of the side chain. @@ -199,13 +180,13 @@ namespace engine { plannedOperations_.pullNext(); plannedOperations_.markTreeLocation(); } +#endif /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 :: to be refactored... }; #if false /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 :: to be refactored... -#endif /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 :: to be refactored... /** * iterator, exposing a sequence of JobPlanning elements */ @@ -286,6 +267,7 @@ namespace engine { calculationStep.discoverPrerequisites()); return newSubEvaluation; } +#endif /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 :: to be refactored... @@ -323,7 +305,6 @@ namespace engine { #if false /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 :: to be refactored... -#endif /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 :: to be refactored... /** * Generate a sequence of starting points for Job planning, * based on the underlying frame grid. This sequence will be @@ -457,6 +438,7 @@ namespace engine { >>= expandPrerequisites) // "flat map" (monad operation) { } }; +#endif /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 :: to be refactored... diff --git a/src/steam/engine/job-ticket.hpp b/src/steam/engine/job-ticket.hpp index 14218032f..32f08a367 100644 --- a/src/steam/engine/job-ticket.hpp +++ b/src/steam/engine/job-ticket.hpp @@ -133,12 +133,14 @@ using lib::LUID; static JobTicket NOP; +#if false /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 :: to be refactored... /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 : likely to become obsolete class ExplorationState; friend class ExplorationState; ExplorationState startExploration() const; ////////////////////////////TICKET #1276 : likely to become obsolete ExplorationState discoverPrerequisites (uint channelNr =0) const; ////////////////////////////TICKET #1276 : likely to become obsolete /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 : likely to become obsolete +#endif /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 :: to be refactored... Job createJobFor (FrameCoord coordinates) const; @@ -179,6 +181,7 @@ using lib::LUID; }; +#if false /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 :: to be refactored... /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 : likely to become obsolete class JobTicket::ExplorationState { @@ -274,6 +277,7 @@ using lib::LUID; } }; /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 : likely to become obsolete +#endif /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 :: to be refactored... @@ -309,6 +313,7 @@ using lib::LUID; +#if false /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 :: to be refactored... /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 : likely to become obsolete /// @deprecated : could be expendable ... likely incurred solely by the use of Monads as design pattern inline JobTicket::ExplorationState @@ -332,6 +337,7 @@ using lib::LUID; : ExplorationState (util::unConst(provision_).prerequisites); } /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 : likely to become obsolete +#endif /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1276 :: to be refactored... }} // namespace steam::engine diff --git a/tests/47engine.tests b/tests/47engine.tests index 7cdc2219a..c3114e15d 100644 --- a/tests/47engine.tests +++ b/tests/47engine.tests @@ -54,6 +54,11 @@ return: 0 END +PLANNED "Render job planning calculation" JobPlanning_test < + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +* *****************************************************/ + +/** @file job-planning-test.cpp + ** unit test \ref JobPlanning_test + ** + ** @warning as of 4/2023 a complete rework of the Dispatcher is underway ///////////////////////////////////////////TICKET #1275 + */ + + +#include "lib/test/run.hpp" +#include "lib/error.hpp" + +//#include "steam/engine/procnode.hpp" +//#include "steam/play/dummy-play-connection.hpp" +//#include "steam/mobject/model-port.hpp" +//#include "steam/engine/dispatcher.hpp" +#include "steam/play/timings.hpp" +#include "lib/time/timevalue.hpp" +//#include "lib/time/timequant.hpp" +//#include "lib/format-cout.hpp" +//#include "lib/depend.hpp" +//#include "lib/itertools.hpp" +//#include "lib/util-coll.hpp" +//#include "lib/util.hpp" + +//#include +//#include + +using test::Test; +//using util::isnil; +//using util::last; +//using std::vector; +//using std::function; +//using std::rand; + + +namespace steam { +namespace engine{ +namespace test { + +// using lib::time::FrameRate; +// using lib::time::Duration; +// using lib::time::Offset; +// using lib::time::TimeVar; +// using lib::time::Time; +// using mobject::ModelPort; +// using play::Timings; + + namespace { // used internally + + +// ModelPort +// getTestPort() +// { +// return mockDispatcher().provideMockModelPort(); +// } + + + } // (End) internal defs +#if false /////////////////////////////////////////////////////////////////////////////////////////////////////////////UNIMPLEMENTED :: TICKET #1301 +#endif /////////////////////////////////////////////////////////////////////////////////////////////////////////////UNIMPLEMENTED :: TICKET #1301 + + + + + + + + /***************************************************************//** + * @test document and verify the data aggregation and the calculations + * necessary to prepare render jobs for scheduling. + * @todo WIP-WIP 6/2023 + */ + class JobPlanning_test : public Test + { + + virtual void + run (Arg) + { + simpleUsage(); + calculateDeadline(); + setupDependentJob(); + } + + + /** @test demonstrate a simple usage scenario + */ + void + simpleUsage() + { + } + + + + /** @test verify the timing calculations to establish + * the scheduling deadline of a simple render job + */ + void + calculateDeadline() + { + } + + + + /** @test verify the setup of a prerequisite job in relation + * to the master job depending on this prerequisite + */ + void + setupDependentJob() + { + } + }; + + + /** Register this test class... */ + LAUNCHER (JobPlanning_test, "unit engine"); + + + +}}} // namespace steam::engine::test diff --git a/tests/core/steam/engine/mock-support-test.cpp b/tests/core/steam/engine/mock-support-test.cpp index 6eb552447..73c2339c6 100644 --- a/tests/core/steam/engine/mock-support-test.cpp +++ b/tests/core/steam/engine/mock-support-test.cpp @@ -135,12 +135,14 @@ namespace test { CHECK (nopJob.parameter.nominalTime == coord.absoluteNominalTime); InvocationInstanceID empty; ///////////////////////////////////////////////////////////////////////TICKET #1287 : temporary workaround until we get rid of the C base structs CHECK (lumiera_invokey_eq (&nopJob.parameter.invoKey, &empty)); + CHECK (MockJob::isNopJob(nopJob)); // this diagnostic helper checks the same conditions as done here explicitly MockJobTicket mockTicket; - CHECK (mockTicket.discoverPrerequisites().empty()); + CHECK (not mockTicket.empty()); Job mockJob = mockTicket.createJobFor (coord); CHECK ( mockTicket.verify_associated (mockJob)); // proof by invocation hash : is indeed backed by this JobTicket CHECK (not mockTicket.verify_associated (nopJob)); // ...while some random other job is not related + CHECK (not MockJob::isNopJob(mockJob)); } diff --git a/tests/core/steam/fixture/fixture-segment-test.cpp b/tests/core/steam/fixture/fixture-segment-test.cpp index 2e35e9350..8fb09db7d 100644 --- a/tests/core/steam/fixture/fixture-segment-test.cpp +++ b/tests/core/steam/fixture/fixture-segment-test.cpp @@ -20,8 +20,8 @@ * *****************************************************/ -/** @file node-graph-attachment-test.cpp - ** unit test \ref NodeGraphAttachment_test +/** @file fixture-segment-test.cpp + ** unit test \ref FixtureSegment_test */ diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 71577b1e0..a60d8bb29 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -75545,6 +75545,9 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
+ + + @@ -75596,7 +75599,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + @@ -75659,7 +75662,6 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- @@ -75667,6 +75669,19 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
+ + + + + + + + + + + + +
@@ -75721,6 +75736,18 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
+ + + + + + + + + + + +