From 3169ba88ad0827e543ea488a2d3871511b3c18ec Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Sat, 24 Jun 2023 03:14:17 +0200 Subject: [PATCH] Scheduler: devise the arrangement of basic components - define organisation of vault-layer namespaces - define the ground plan of the scheduler implementation --- src/doxygen.dox | 4 + src/stage/gtk-base.hpp | 5 +- src/steam/common.hpp | 5 +- src/steam/engine/exit-node.hpp | 4 +- src/steam/engine/job-planning.hpp | 3 +- src/steam/engine/job-ticket.cpp | 7 +- src/steam/engine/job-ticket.hpp | 8 +- src/steam/engine/render-drive.hpp | 6 +- src/vault/common.hpp | 116 ++++++++++++++++++ src/vault/gear/activity-lang.hpp | 80 ++++++++++++ src/vault/gear/activity.hpp | 83 +++++++++++++ src/vault/gear/block-flow.cpp | 62 ++++++++++ src/vault/gear/block-flow.hpp | 87 +++++++++++++ src/vault/{engine => gear}/engine-config.cpp | 6 +- src/vault/{engine => gear}/engine-config.hpp | 10 +- src/vault/{engine => gear}/job.cpp | 14 +-- src/vault/{engine => gear}/job.h | 12 +- .../{engine => gear}/nop-job-functor.hpp | 14 +-- src/vault/gear/scheduler-control.hpp | 75 +++++++++++ .../scheduler-diagnostics.hpp | 12 +- .../{engine => gear}/scheduler-frontend.cpp | 6 +- .../{engine => gear}/scheduler-frontend.hpp | 14 +-- src/vault/gear/scheduler-invocation.hpp | 76 ++++++++++++ src/vault/gear/scheduler.cpp | 65 ++++++++++ src/vault/gear/scheduler.hpp | 83 +++++++++++++ src/vault/gear/work-force.cpp | 64 ++++++++++ src/vault/gear/work-force.hpp | 75 +++++++++++ tests/core/steam/engine/job-hash-test.cpp | 5 +- tests/core/steam/engine/mock-dispatcher.cpp | 6 +- tests/core/steam/engine/mock-dispatcher.hpp | 6 +- tests/core/steam/engine/mock-support-test.cpp | 6 +- .../steam/engine/scheduler-interface-test.cpp | 10 +- .../steam/fixture/fixture-segment-test.cpp | 2 +- wiki/renderengine.html | 6 +- wiki/thinkPad.ichthyo.mm | 109 ++++++++++++++-- 35 files changed, 1056 insertions(+), 90 deletions(-) create mode 100644 src/vault/common.hpp create mode 100644 src/vault/gear/activity-lang.hpp create mode 100644 src/vault/gear/activity.hpp create mode 100644 src/vault/gear/block-flow.cpp create mode 100644 src/vault/gear/block-flow.hpp rename src/vault/{engine => gear}/engine-config.cpp (96%) rename src/vault/{engine => gear}/engine-config.hpp (95%) rename src/vault/{engine => gear}/job.cpp (96%) rename src/vault/{engine => gear}/job.h (98%) rename src/vault/{engine => gear}/nop-job-functor.hpp (92%) create mode 100644 src/vault/gear/scheduler-control.hpp rename src/vault/{engine => gear}/scheduler-diagnostics.hpp (94%) rename src/vault/{engine => gear}/scheduler-frontend.cpp (95%) rename src/vault/{engine => gear}/scheduler-frontend.hpp (95%) create mode 100644 src/vault/gear/scheduler-invocation.hpp create mode 100644 src/vault/gear/scheduler.cpp create mode 100644 src/vault/gear/scheduler.hpp create mode 100644 src/vault/gear/work-force.cpp create mode 100644 src/vault/gear/work-force.hpp diff --git a/src/doxygen.dox b/src/doxygen.dox index 4a7746672..2e3104a7c 100644 --- a/src/doxygen.dox +++ b/src/doxygen.dox @@ -88,6 +88,10 @@ with the *ASCIIDOC* tool and published at the [Lumiera website](http://Lumiera.o @ingroup vault */ +/** @defgroup memory Memory Management + @ingroup vault +*/ + /* ==== Global Namespaces ==== */ diff --git a/src/stage/gtk-base.hpp b/src/stage/gtk-base.hpp index bf88e1cb0..020dc115b 100644 --- a/src/stage/gtk-base.hpp +++ b/src/stage/gtk-base.hpp @@ -84,7 +84,10 @@ /* ======= Namespace Definitions ======= */ -/** Lumiera GTK UI implementation root. */ +/** + * Lumiera GTK UI implementation root. + * @ingroup gui + */ namespace stage { /* some commonly used error marks for the UI... */ diff --git a/src/steam/common.hpp b/src/steam/common.hpp index 62bb5ba28..3e30ddad1 100644 --- a/src/steam/common.hpp +++ b/src/steam/common.hpp @@ -41,7 +41,7 @@ - /* frequently used common types... */ +/* ===== frequently used common types ===== */ #include "lib/p.hpp" #include "lib/util.hpp" @@ -60,6 +60,7 @@ * session support system, the playback-and-render-control subsystem and * the API and backbone of the renderengine. Most render implementation * code resides in the vault layer or is loaded from plug-ins though. + * @ingroup steam */ namespace steam { @@ -88,7 +89,7 @@ namespace steam { /** - * Render engine code as part of the Steam-Layer. + * Lumiera's render engine core and operational control. * Backbone of the engine, render nodes base and cooperation. * A good deal of the active engine code is outside the scope of the * Steam-Layer, e.g. code located in vault services and plugins. diff --git a/src/steam/engine/exit-node.hpp b/src/steam/engine/exit-node.hpp index c1a643431..c48821aea 100644 --- a/src/steam/engine/exit-node.hpp +++ b/src/steam/engine/exit-node.hpp @@ -35,7 +35,7 @@ #include "lib/hash-value.h" #include "lib/iter-adapter-stl.hpp" #include "lib/time/timevalue.hpp" -#include "vault/engine/job.h" //////////////////////////////////////////////////////////////////TICKET #1295 : rather need a way to retrieve a real JobFunctor building block from the ProcNode +#include "vault/gear/job.h" //////////////////////////////////////////////////////////////////TICKET #1295 : rather need a way to retrieve a real JobFunctor building block from the ProcNode #include #include @@ -51,7 +51,7 @@ namespace engine { class ExitNode; using ExitNodes = std::deque; - using vault::engine::JobFunctor; + using vault::gear::JobFunctor; namespace {// hard wired placeholder config.... const Duration DUMMY_JOB_RUNTIME{FSecs{1,50}}; diff --git a/src/steam/engine/job-planning.hpp b/src/steam/engine/job-planning.hpp index 0dd3ce457..beb49788a 100644 --- a/src/steam/engine/job-planning.hpp +++ b/src/steam/engine/job-planning.hpp @@ -68,7 +68,7 @@ #define STEAM_ENGINE_JOB_PLANNING_H #include "steam/common.hpp" -#include "vault/engine/job.h" +#include "vault/gear/job.h" #include "steam/engine/job-ticket.hpp" #include "steam/play/output-slot.hpp" #include "steam/play/timings.hpp" @@ -88,6 +88,7 @@ namespace engine { using lib::time::Time; using lib::time::TimeVar; using lib::time::Duration; + using vault::gear::Job; diff --git a/src/steam/engine/job-ticket.cpp b/src/steam/engine/job-ticket.cpp index 09165dee9..beafbeaca 100644 --- a/src/steam/engine/job-ticket.cpp +++ b/src/steam/engine/job-ticket.cpp @@ -31,7 +31,7 @@ #include "steam/engine/job-ticket.hpp" -#include "vault/engine/nop-job-functor.hpp" +#include "vault/gear/nop-job-functor.hpp" #include "lib/depend.hpp" #include "lib/util.hpp" @@ -39,14 +39,15 @@ namespace steam { namespace engine { - using vault::engine::JobClosure; + using vault::gear::Job; + using vault::gear::JobClosure; using lib::HashVal; using lib::unConst; using lib::time::FSecs; namespace { // Details... - lib::Depend nopFunctor; + lib::Depend nopFunctor; /* ======== hard wired =================*/ const FSecs JOB_MINIMUM_RUNTIME{1,1000}; diff --git a/src/steam/engine/job-ticket.hpp b/src/steam/engine/job-ticket.hpp index cd423b5e2..5031805ee 100644 --- a/src/steam/engine/job-ticket.hpp +++ b/src/steam/engine/job-ticket.hpp @@ -36,7 +36,7 @@ #define STEAM_ENGINE_JOB_TICKET_H #include "steam/common.hpp" -#include "vault/engine/job.h" +#include "vault/gear/job.h" #include "steam/engine/exit-node.hpp" #include "lib/time/timevalue.hpp" #include "lib/linked-elements.hpp" @@ -52,9 +52,9 @@ namespace steam { namespace engine { -using vault::engine::Job; -using vault::engine::JobFunctor; -using vault::engine::JobClosure; /////////////////////////////////////////////////////////////////////TICKET #1287 : fix actual interface down to JobFunctor (after removing C structs) +using vault::gear::Job; +using vault::gear::JobFunctor; +using vault::gear::JobClosure; /////////////////////////////////////////////////////////////////////TICKET #1287 : fix actual interface down to JobFunctor (after removing C structs) using lib::LinkedElements; using lib::time::Duration; using lib::time::Time; diff --git a/src/steam/engine/render-drive.hpp b/src/steam/engine/render-drive.hpp index 8101780a6..c84c86735 100644 --- a/src/steam/engine/render-drive.hpp +++ b/src/steam/engine/render-drive.hpp @@ -43,7 +43,7 @@ #include "steam/mobject/model-port.hpp" #include "steam/engine/dispatcher.hpp" #include "steam/play/timings.hpp" -#include "vault/engine/job.h" +#include "vault/gear/job.h" //#include "lib/nocopy.hpp" @@ -51,8 +51,8 @@ namespace steam { namespace engine { // using std::function; - using vault::engine::JobParameter; - using vault::engine::JobClosure; + using vault::gear::JobParameter; + using vault::gear::JobClosure; using mobject::ModelPort; // using lib::time::TimeSpan; // using lib::time::FSecs; diff --git a/src/vault/common.hpp b/src/vault/common.hpp new file mode 100644 index 000000000..dbe0d616e --- /dev/null +++ b/src/vault/common.hpp @@ -0,0 +1,116 @@ +/* + COMMON.hpp - common types and definitions for the Vault-Layer + + + Copyright (C) Lumiera.org + 2023, Hermann Vosseler + + 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 vault/common.hpp + ** Basic set of definitions and includes commonly used together (Vault). + ** Including common.hpp gives you a common set of elementary declarations + ** widely used within the C++ code of the Vault-Layer. Besides that, this + ** header is used to attach the doxygen documentation comments for all + ** the primary Vault-Layer namespaces + ** + ** @see main.cpp + ** + */ + + + +#ifndef VAULT_COMMON_H +#define VAULT_COMMON_H + + + + +/* ===== frequently used common types ===== */ + +#include "lib/error.hpp" // pulls in NoBug via loggging.h +#include "lib/nocopy.hpp" +#include "lib/symbol.hpp" +#include "lib/time/timevalue.hpp" + + + +/** + * Vault-Layer implementation namespace root. + * The lowest layer in Lumiera's architecture provides the interface to + * the operating system and similar fundamental high-performance services: + * - Scheduler + * - Frame Cache + * - I/O support + * - persistent storage format + * - specialised memory management + * @ingroup vault + */ +namespace vault { + + + /** + * I/O subsystem and support. + * System level and platform services. + */ + namespace io { } + + + /** + * Output management and connectors. + */ + namespace out { } + + + /** + * Memory Management. + */ + namespace mem { } + + + /** + * Active working gear and plumbing. + * Notably the Scheduler and performance observation and self-regulation are implemented here. + */ + namespace gear { } + + + /** + * The frame and media cache. + */ + namespace cache { } + + + /** + * Lumiera Render Toolkit. + * This is a set of adapters and thin wrappers on top of external implementation, + * to provide some commonplace generic functionality in an abstracted way for use + * from the actual render jobs. + */ + namespace toolkit { } + + + /** + * Persistent storage formats. + * Support for structured data storage and exchange, for session and command log. + * Import / Export and metadata handling + */ + namespace storage { } + +} //(End)namespace steam + +#endif /*VAULT_COMMON_H*/ diff --git a/src/vault/gear/activity-lang.hpp b/src/vault/gear/activity-lang.hpp new file mode 100644 index 000000000..342a8bed5 --- /dev/null +++ b/src/vault/gear/activity-lang.hpp @@ -0,0 +1,80 @@ +/* + ACTIVITY-LANG.hpp - definition language framework for scheduler activities + + Copyright (C) Lumiera.org + 2023, Hermann Vosseler + + 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 activity-lang.hpp + ** A language framework to define and interconnect scheduler activity verbs. + ** This is an interface to build valid activity descriptors, connect them with + ** other activities and provide parameter data. The resulting definition terms + ** can be passed to the scheduler's messaging queue to cause the described + ** activities to be performed in the context of the Lumiera render engine. + ** + ** @note this is a wild fantasy + ** @see ////TODO_test usage example + ** @see scheduler.cpp implementation + ** + ** @todo WIP-WIP-WIP 6/2023 »Playback Vertical Slice« + ** + */ + + +#ifndef SRC_VAULT_GEAR_ACTIVITY_LANG_H_ +#define SRC_VAULT_GEAR_ACTIVITY_LANG_H_ + + +#include "vault/gear/activity.hpp" +//#include "lib/symbol.hpp" +//#include "lib/util.hpp" + +//#include + + +namespace vault{ +namespace gear { + +// using util::isnil; +// using std::string; + + + /** + * Basic (abstracted) view of... + * + * @see SomeSystem + * @see NA_test + */ + class ActivityLang + { + string nothing_; + + public: +// explicit + ActivityLang () + : nothing_(b) + { } + + // using default copy/assignment + }; + + + +}} // namespace vault::gear +#endif /*SRC_VAULT_GEAR_ACTIVITY_LANG_H_*/ diff --git a/src/vault/gear/activity.hpp b/src/vault/gear/activity.hpp new file mode 100644 index 000000000..df1d8c130 --- /dev/null +++ b/src/vault/gear/activity.hpp @@ -0,0 +1,83 @@ +/* + ACTIVITY.hpp - elementary operation to be handled by the scheduler + + Copyright (C) Lumiera.org + 2023, Hermann Vosseler + + 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 activity.hpp + ** Descriptor for a piece of operational logic performed by the scheduler. + ** The Scheduler in Lumiera's Vault coordinates the rendering activities, + ** by passing and responding to _Activity messages,_ thereby observing + ** temporal limits (deadlines) and dependency constraints. A predefined + ** and fixed set of _Activity verbs_ defines atomic operations the engine + ** is able to perform, directed by the scheduler. Complex calculation + ** tasks are constructed from interconnected activities, passing through + ** the messaging and priority queue of the scheduler. While an Activity + ** is in processing, the corresponding descriptor data record is maintained + ** by the BlockStream custom memory manager. + ** + ** @note right now this is a pipe dream + ** @see ////TODO_test usage example + ** @see scheduler.cpp implementation + ** + ** @todo WIP-WIP-WIP 6/2023 »Playback Vertical Slice« + ** + */ + + +#ifndef SRC_VAULT_GEAR_ACTIVITY_H_ +#define SRC_VAULT_GEAR_ACTIVITY_H_ + + +#include "vault/common.hpp" +//#include "lib/symbol.hpp" +//#include "lib/util.hpp" + +//#include + + +namespace vault{ +namespace gear { + +// using util::isnil; +// using std::string; + + + /** + * Basic (abstracted) view of... + * + * @see SomeSystem + * @see NA_test + */ + class Activity + { + + public: +// explicit + Activity () + { } + + // using default copy/assignment + }; + + + +}} // namespace vault::gear +#endif /*SRC_VAULT_GEAR_ACTIVITY_H_*/ diff --git a/src/vault/gear/block-flow.cpp b/src/vault/gear/block-flow.cpp new file mode 100644 index 000000000..7dd61d52c --- /dev/null +++ b/src/vault/gear/block-flow.cpp @@ -0,0 +1,62 @@ +/* + BlockFlow - specialised custom allocator to manage scheduler data + + Copyright (C) Lumiera.org + 2023, Hermann Vosseler + + 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 block-flow.cpp + ** Implementation details of the custom memory manager backing scheduler operation. + ** + ** @note currently the greatest challenge is de-allocation + ** + ** @see ////TODO_test usage example + ** + ** @todo WIP-WIP-WIP 6/2023 »Playback Vertical Slice« + ** + */ + + +#include "vault/gear/block-flow.hpp" +//#include "lib/symbol.hpp" +//#include "include/logging.h" + +//#include + +//using std::string; +//using util::isnil; + + +namespace vault{ +namespace gear { + + namespace { // internal details + + } // internal details + + + +// NA::~NA() { } + + + + + /** + */ + +}} // namespace vault::gear diff --git a/src/vault/gear/block-flow.hpp b/src/vault/gear/block-flow.hpp new file mode 100644 index 000000000..caf05636b --- /dev/null +++ b/src/vault/gear/block-flow.hpp @@ -0,0 +1,87 @@ +/* + BLOCK-FLOW.hpp - specialised custom allocator to manage scheduler data + + Copyright (C) Lumiera.org + 2023, Hermann Vosseler + + 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 block-flow.hpp + ** Memory management scheme for activities and parameter data passed through + ** the Scheduler within the Lumiera render engine. While — conceptually — the + ** intended render operations are described as connected activity terms, sent + ** as messages through the scheduler, the actual implementation requires a fixed + ** descriptor record sitting at a stable memory location while the computation + ** is underway. Moreover, activities can spawn further activities, implying that + ** activity descriptor records can emanate from multiple threads concurrently, + ** and the duration to keep those descriptors in valid state is contingent. + ** On the other hand, ongoing rendering produces a constant flow of further + ** activities, necessitating timely clean-up of obsolete descriptors. + ** Used memory should be recycled, calling for an arrangement of + ** pooled allocation tiles, extending the underlying block + ** allocation on increased throughput. + ** + ** @note currently this rather marks the intended memory management pattern, + ** while the actual allocations are still performed on the heap. + ** @see ////TODO_test usage example + ** @see scheduler.cpp implementation + ** + ** @todo WIP-WIP-WIP 6/2023 »Playback Vertical Slice« + ** + */ + + +#ifndef SRC_VAULT_GEAR_BLOCK_FLOW_H_ +#define SRC_VAULT_GEAR_BLOCK_FLOW_H_ + + +#include "vault/common.hpp" +//#include "lib/symbol.hpp" +#include "lib/nocopy.hpp" +//#include "lib/util.hpp" + +//#include + + +namespace vault{ +namespace gear { + +// using util::isnil; +// using std::string; + + + /** + * Basic (abstracted) view of... + * + * @see SomeSystem + * @see NA_test + */ + class BlockFlow + : util::NonCopyable + { + + public: + explicit + BlockFlow (int woof) + { } + }; + + + +}} // namespace vault::gear +#endif /*SRC_VAULT_GEAR_BLOCK_FLOW_H_*/ diff --git a/src/vault/engine/engine-config.cpp b/src/vault/gear/engine-config.cpp similarity index 96% rename from src/vault/engine/engine-config.cpp rename to src/vault/gear/engine-config.cpp index cf575d6c8..ae1657430 100644 --- a/src/vault/engine/engine-config.cpp +++ b/src/vault/gear/engine-config.cpp @@ -29,7 +29,7 @@ */ -#include "vault/engine/engine-config.hpp" +#include "vault/gear/engine-config.hpp" #include "lib/time/timevalue.hpp" #include "lib/rational.hpp" @@ -40,7 +40,7 @@ using util::Rat; namespace vault{ -namespace engine { +namespace gear { namespace { // Hard wired placeholder settings... @@ -83,4 +83,4 @@ namespace engine { return DEFAULT_JOB_PLANNING_TURNOVER; } -}} // namespace vault::engine +}} // namespace vault::gear diff --git a/src/vault/engine/engine-config.hpp b/src/vault/gear/engine-config.hpp similarity index 95% rename from src/vault/engine/engine-config.hpp rename to src/vault/gear/engine-config.hpp index 11ed388f9..ed4333bc5 100644 --- a/src/vault/engine/engine-config.hpp +++ b/src/vault/gear/engine-config.hpp @@ -29,8 +29,8 @@ */ -#ifndef VAULT_ENGINE_ENGINE_CONFIG_H -#define VAULT_ENGINE_ENGINE_CONFIG_H +#ifndef VAULT_GEAR_ENGINE_CONFIG_H +#define VAULT_GEAR_ENGINE_CONFIG_H @@ -39,7 +39,7 @@ namespace vault{ -namespace engine { +namespace gear { using lib::time::Duration; @@ -100,5 +100,5 @@ namespace engine { Duration currentJobPlanningRhythm() const; }; -}} // namespace vault::engine -#endif/*VAULT_ENGINE_ENGINE_CONFIG_H*/ +}} // namespace vault::gear +#endif/*VAULT_GEAR_ENGINE_CONFIG_H*/ diff --git a/src/vault/engine/job.cpp b/src/vault/gear/job.cpp similarity index 96% rename from src/vault/engine/job.cpp rename to src/vault/gear/job.cpp index 350056bab..063a6875b 100644 --- a/src/vault/engine/job.cpp +++ b/src/vault/gear/job.cpp @@ -33,16 +33,16 @@ */ -#include "vault/engine/job.h" -#include "vault/engine/nop-job-functor.hpp" +#include "vault/gear/job.h" +#include "vault/gear/nop-job-functor.hpp" #include "lib/util.hpp" #include #include -namespace vault { -namespace engine { +namespace vault{ +namespace gear { namespace { // Details... @@ -146,10 +146,10 @@ namespace engine { } -}} // namespace vault::engine +}} // namespace vault::gear namespace { - using vault::engine::Job; + using vault::gear::Job; inline Job& forwardInvocation (lumiera_jobDefinition& jobDef) @@ -194,4 +194,4 @@ lumiera_invokey_eq (void* l, void* r) { return lumiera_uid_eq ((LumieraUid)l, (LumieraUid)r); } -} +}/* extern "C" */ diff --git a/src/vault/engine/job.h b/src/vault/gear/job.h similarity index 98% rename from src/vault/engine/job.h rename to src/vault/gear/job.h index ef54eddbb..cedfbe3bd 100644 --- a/src/vault/engine/job.h +++ b/src/vault/gear/job.h @@ -48,8 +48,8 @@ */ -#ifndef VAULT_ENGINE_JOB_H -#define VAULT_ENGINE_JOB_H +#ifndef VAULT_GEAR_JOB_H +#define VAULT_GEAR_JOB_H #include "lib/llist.h" @@ -199,8 +199,8 @@ typedef lumiera_jobDescriptor* LumieraJobDescriptor; -namespace vault { -namespace engine { +namespace vault{ +namespace gear { using lib::time::TimeValue; using lib::time::Time; @@ -325,7 +325,7 @@ namespace engine { -}} // namespace vault::engine +}} // namespace vault::gear @@ -354,4 +354,4 @@ int lumiera_invokey_eq (void* l, void* r); #ifdef __cplusplus } #endif -#endif /*VAULT_ENGINE_JOB_H*/ +#endif /*VAULT_GEAR_JOB_H*/ diff --git a/src/vault/engine/nop-job-functor.hpp b/src/vault/gear/nop-job-functor.hpp similarity index 92% rename from src/vault/engine/nop-job-functor.hpp rename to src/vault/gear/nop-job-functor.hpp index ea6602dee..9076b4b2f 100644 --- a/src/vault/engine/nop-job-functor.hpp +++ b/src/vault/gear/nop-job-functor.hpp @@ -31,18 +31,18 @@ */ -#ifndef VAULT_ENGINE_NOP_JOB_FUNCTOR_H -#define VAULT_ENGINE_NOP_JOB_FUNCTOR_H +#ifndef VAULT_GEAR_NOP_JOB_FUNCTOR_H +#define VAULT_GEAR_NOP_JOB_FUNCTOR_H #include "lib/hash-standard.hpp" -#include "vault/engine/job.h" +#include "vault/gear/job.h" #include "lib/time/timevalue.hpp" -namespace vault { -namespace engine{ +namespace vault{ +namespace gear { using lib::time::Time; using lib::HashVal; @@ -103,5 +103,5 @@ namespace engine{ }; -}} // namespace vault::engine -#endif /*VAULT_ENGINE_NOP_JOB_FUNCTOR_H*/ +}} // namespace vault::gear +#endif /*VAULT_GEAR_NOP_JOB_FUNCTOR_H*/ diff --git a/src/vault/gear/scheduler-control.hpp b/src/vault/gear/scheduler-control.hpp new file mode 100644 index 000000000..db0714ef0 --- /dev/null +++ b/src/vault/gear/scheduler-control.hpp @@ -0,0 +1,75 @@ +/* + SCHEDULER-CONTROL.hpp - coordination layer of the render engine scheduler + + Copyright (C) Lumiera.org + 2023, Hermann Vosseler + + 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 scheduler-control.hpp + ** Layer-2 of the Scheduler: coordination of activities. + ** This is the upper layer of the implementation and provides high-level functionality. + ** + ** @see ////TODO_test usage example + ** @see scheduler.cpp implementation + ** + ** @todo WIP-WIP-WIP 6/2023 »Playback Vertical Slice« + ** + */ + + +#ifndef SRC_VAULT_GEAR_SCHEDULER_CONTROL_H_ +#define SRC_VAULT_GEAR_SCHEDULER_CONTROL_H_ + + +#include "vault/common.hpp" +#include "lib/nocopy.hpp" +//#include "lib/symbol.hpp" +//#include "lib/util.hpp" + +//#include + + +namespace vault{ +namespace gear { + +// using util::isnil; +// using std::string; + + + /** + * Scheduler Layer-2 : coordination. + * + * @see SomeSystem + * @see NA_test + */ + class SchedulerControl + : util::NonCopyable + { + + public: + explicit + SchedulerControl (int const& b) + { } + + }; + + + +}} // namespace vault::gear +#endif /*SRC_VAULT_GEAR_SCHEDULER_CONTROL_H_*/ diff --git a/src/vault/engine/scheduler-diagnostics.hpp b/src/vault/gear/scheduler-diagnostics.hpp similarity index 94% rename from src/vault/engine/scheduler-diagnostics.hpp rename to src/vault/gear/scheduler-diagnostics.hpp index a6a56c41b..00b519b52 100644 --- a/src/vault/engine/scheduler-diagnostics.hpp +++ b/src/vault/gear/scheduler-diagnostics.hpp @@ -33,19 +33,19 @@ */ -#ifndef VAULT_ENGINE_SCHEDULER_DIAGNOSTICS_H -#define VAULT_ENGINE_SCHEDULER_DIAGNOSTICS_H +#ifndef VAULT_GEAR_SCHEDULER_DIAGNOSTICS_H +#define VAULT_GEAR_SCHEDULER_DIAGNOSTICS_H #include "lib/error.hpp" #include "lib/nocopy.hpp" #include "lib/hash-value.h" #include "lib/time/timevalue.hpp" -#include "vault/engine/scheduler-frontend.hpp" +#include "vault/gear/scheduler-frontend.hpp" namespace vault{ -namespace engine { +namespace gear { // using std::string; using lib::time::Time; @@ -141,5 +141,5 @@ namespace engine { -}} // namespace vault::engine -#endif +}} // namespace vault::gear +#endif /*VAULT_GEAR_SCHEDULER_DIAGNOSTICS_H*/ diff --git a/src/vault/engine/scheduler-frontend.cpp b/src/vault/gear/scheduler-frontend.cpp similarity index 95% rename from src/vault/engine/scheduler-frontend.cpp rename to src/vault/gear/scheduler-frontend.cpp index a14558427..334d491c7 100644 --- a/src/vault/engine/scheduler-frontend.cpp +++ b/src/vault/gear/scheduler-frontend.cpp @@ -29,10 +29,10 @@ #include "lib/error.h" -#include "vault/engine/scheduler-frontend.hpp" +#include "vault/gear/scheduler-frontend.hpp" namespace vault{ -namespace engine { +namespace gear { /** storage for the (singleton) scheduler access frontend */ @@ -62,4 +62,4 @@ namespace engine { -}} // namespace vault::engine +}} // namespace vault::gear diff --git a/src/vault/engine/scheduler-frontend.hpp b/src/vault/gear/scheduler-frontend.hpp similarity index 95% rename from src/vault/engine/scheduler-frontend.hpp rename to src/vault/gear/scheduler-frontend.hpp index a1f6ba08d..6cabbfe27 100644 --- a/src/vault/engine/scheduler-frontend.hpp +++ b/src/vault/gear/scheduler-frontend.hpp @@ -29,18 +29,18 @@ */ -#ifndef VAULT_ENGINE_SCHEDULER_FRONTEND_H -#define VAULT_ENGINE_SCHEDULER_FRONTEND_H +#ifndef VAULT_GEAR_SCHEDULER_FRONTEND_H +#define VAULT_GEAR_SCHEDULER_FRONTEND_H #include "lib/depend.hpp" #include "lib/time/timevalue.hpp" -#include "vault/engine/job.h" +#include "vault/gear/job.h" namespace vault{ -namespace engine { +namespace gear { using lib::time::Time; @@ -56,7 +56,7 @@ namespace engine { * @ingroup scheduler * @todo this is planned to become the frontend * to the render node network, which can be considered - * at the lower end of the middle layer; the actual + * at the lower end of the middle layer; the actual * render operations are mostly implemented by the vault layer * @todo define the low-level scheduler interface and hook in * the necessary calls to implement this frontend. @@ -178,5 +178,5 @@ namespace engine { }; -}} // namespace vault::engine -#endif +}} // namespace vault::gear +#endif /*VAULT_GEAR_SCHEDULER_FRONTEND_H*/ diff --git a/src/vault/gear/scheduler-invocation.hpp b/src/vault/gear/scheduler-invocation.hpp new file mode 100644 index 000000000..2893b2050 --- /dev/null +++ b/src/vault/gear/scheduler-invocation.hpp @@ -0,0 +1,76 @@ +/* + SCHEDULER-INVOCATION.hpp - invocation layer of the render engine scheduler + + Copyright (C) Lumiera.org + 2023, Hermann Vosseler + + 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 scheduler-invocation.hpp + ** Layer-1 of the Scheduler: dispatch and invocation of activities. + ** This is the lower layer of the implementation and provides low-level functionality. + ** + ** @note as of X/2023 this is complete bs + ** @see ////TODO_test usage example + ** @see scheduler.cpp implementation + ** + ** @todo WIP-WIP-WIP 6/2023 »Playback Vertical Slice« + ** + */ + + +#ifndef SRC_VAULT_GEAR_SCHEDULER_INVOCATION_H_ +#define SRC_VAULT_GEAR_SCHEDULER_INVOCATION_H_ + + +#include "vault/common.hpp" +#include "lib/nocopy.hpp" +//#include "lib/symbol.hpp" +//#include "lib/util.hpp" + +//#include + + +namespace vault{ +namespace gear { + +// using util::isnil; +// using std::string; + + + /** + * Scheduler Layer-2 : invocation. + * + * @see SomeSystem + * @see NA_test + */ + class SchedulerInvocation + : util::NonCopyable + { + + public: + explicit + SchedulerInvocation (int const& moo) + { } + + }; + + + +}} // namespace vault::gear +#endif /*SRC_VAULT_GEAR_SCHEDULER_INVOCATION_H_*/ diff --git a/src/vault/gear/scheduler.cpp b/src/vault/gear/scheduler.cpp new file mode 100644 index 000000000..dd4748770 --- /dev/null +++ b/src/vault/gear/scheduler.cpp @@ -0,0 +1,65 @@ +/* + Scheduler - coordination of render activities under timing and dependency constraints + + Copyright (C) Lumiera.org + 2023, Hermann Vosseler + + 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 scheduler.cpp + ** Implementation of messaging, dispatch and prioritisation of render activities. + ** The _scheduling_ functionality is assembled from low-level operational building blocks. + ** + ** @note as of X/2023 this is complete bs + ** @todo WIP ///////////////////////TICKET # + ** + ** @see ////TODO_test usage example + ** @see scheduler.cpp implementation + ** + ** @todo WIP-WIP-WIP 6/2023 »Playback Vertical Slice« + ** + */ + + +#include "vault/gear/scheduler.hpp" +//#include "lib/symbol.hpp" +//#include "include/logging.h" + +//#include + +//using std::string; +//using util::isnil; + + +namespace vault{ +namespace gear { + + namespace { // internal details + + } // internal details + + + +// NA::~NA() { } + + + + + /** + */ + +}} // namespace vault::gear diff --git a/src/vault/gear/scheduler.hpp b/src/vault/gear/scheduler.hpp new file mode 100644 index 000000000..b12fbacd4 --- /dev/null +++ b/src/vault/gear/scheduler.hpp @@ -0,0 +1,83 @@ +/* + SCHEDULER.hpp - coordination of render activities under timing and dependency constraints + + Copyright (C) Lumiera.org + 2023, Hermann Vosseler + + 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 scheduler.hpp + ** Service for coordination and dispatch of render activities. + ** The implementation of scheduling services is provided by an integration + ** of two layers of functionality: + ** - Layer-1 allows to enqueue and prioritise render activity records + ** - Layer-2 connects and coordinates activities to conduct complex calculations + ** + ** @see ////TODO_test usage example + ** @see scheduler.cpp implementation + ** + ** @todo WIP-WIP-WIP 6/2023 »Playback Vertical Slice« + ** + */ + + +#ifndef SRC_VAULT_GEAR_SCHEDULER_H_ +#define SRC_VAULT_GEAR_SCHEDULER_H_ + + +#include "lib/error.hpp" +#include "vault/gear/block-flow.hpp" +#include "vault/gear/scheduler-control.hpp" +#include "vault/gear/scheduler-invocation.hpp" +//#include "lib/symbol.hpp" +#include "lib/nocopy.hpp" +//#include "lib/util.hpp" + +//#include + + +namespace vault{ +namespace gear { + +// using util::isnil; +// using std::string; + + + /** + * Schedule and coordinate render activities. + * @todo WIP-WIP 6/2023 + * @see SomeSystem + * @see NA_test + */ + class Scheduler + { + int nothing_; + + public: + explicit + Scheduler (int const& boo) + : nothing_(boo) + { } + + // using default copy/assignment + }; + + + +}} // namespace vault::gear +#endif /*SRC_VAULT_GEAR_SCHEDULER_H_*/ diff --git a/src/vault/gear/work-force.cpp b/src/vault/gear/work-force.cpp new file mode 100644 index 000000000..5f3005b93 --- /dev/null +++ b/src/vault/gear/work-force.cpp @@ -0,0 +1,64 @@ +/* + WorkForce.hpp - actively coordinated pool of workers for rendering + + Copyright (C) Lumiera.org + 2023, Hermann Vosseler + + 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 work-force.cpp + ** Implementation of render worker coordination. + ** + ** @note as of X/2023 this is complete bs + ** @todo WIP ///////////////////////TICKET # + ** + ** @see ////TODO_test usage example + ** @see scheduler.cpp implementation + ** + ** @todo WIP-WIP-WIP 6/2023 »Playback Vertical Slice« + ** + */ + + +#include "vault/gear/work-force.hpp" +//#include "lib/symbol.hpp" +//#include "include/logging.h" + +//#include + +//using std::string; +//using util::isnil; + + +namespace vault{ +namespace gear { + + namespace { // internal details + + } // internal details + + + +// NA::~NA() { } + + + + + /** + */ + +}} // namespace vault::gear diff --git a/src/vault/gear/work-force.hpp b/src/vault/gear/work-force.hpp new file mode 100644 index 000000000..e708dd063 --- /dev/null +++ b/src/vault/gear/work-force.hpp @@ -0,0 +1,75 @@ +/* + WORK-FORCE.hpp - actively coordinated pool of workers for rendering + + Copyright (C) Lumiera.org + 2023, Hermann Vosseler + + 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 work-force.hpp + ** A pool of workers for multithreaded rendering. + ** + ** @see ////TODO_test usage example + ** @see scheduler.cpp implementation + ** + ** @todo WIP-WIP-WIP 6/2023 »Playback Vertical Slice« + ** + */ + + +#ifndef SRC_VAULT_GEAR_WORK_FORCE_H_ +#define SRC_VAULT_GEAR_WORK_FORCE_H_ + + +#include "vault/common.hpp" +#include "lib/nocopy.hpp" +//#include "lib/symbol.hpp" +//#include "lib/util.hpp" + +//#include + + +namespace vault{ +namespace gear { + +// using util::isnil; +// using std::string; + + + /** + * Pool of worker threads for rendering. + * + * @see SomeSystem + * @see NA_test + */ + class WorkForce + : util::NonCopyable + { + short nothing_; + + public: + explicit + WorkForce (char const& b) + : nothing_(b) + { } + }; + + + +}} // namespace vault::gear +#endif /*SRC_VAULT_GEAR_WORK_FORCE_H_*/ diff --git a/tests/core/steam/engine/job-hash-test.cpp b/tests/core/steam/engine/job-hash-test.cpp index ff091b912..c2e153a4e 100644 --- a/tests/core/steam/engine/job-hash-test.cpp +++ b/tests/core/steam/engine/job-hash-test.cpp @@ -29,6 +29,7 @@ #include "lib/util.hpp" #include "vault/real-clock.hpp" +#include "vault/gear/job.h" #include "steam/engine/mock-dispatcher.hpp" #include @@ -39,8 +40,8 @@ namespace engine{ namespace test { using util::isSameObject; - using vault::engine::Job; - using vault::engine::JobParameter; + using vault::gear::Job; + using vault::gear::JobParameter; diff --git a/tests/core/steam/engine/mock-dispatcher.cpp b/tests/core/steam/engine/mock-dispatcher.cpp index 40c43acd9..8c3e50e58 100644 --- a/tests/core/steam/engine/mock-dispatcher.cpp +++ b/tests/core/steam/engine/mock-dispatcher.cpp @@ -40,7 +40,7 @@ #include "steam/engine/mock-dispatcher.hpp" -#include "vault/engine/nop-job-functor.hpp" +#include "vault/gear/nop-job-functor.hpp" #include "lib/test/test-helper.hpp" #include "lib/time/timevalue.hpp" #include "vault/real-clock.hpp" @@ -66,7 +66,7 @@ namespace test { using std::unordered_map; using util::access_or_default; - using vault::engine::JobParameter; + using vault::gear::JobParameter; const int MAX_PARAM_A(1000); ///< random test values 0...1000 @@ -186,7 +186,7 @@ namespace test { DummyClosure dummyClosure; /** access to the fallback-implementation for empty segments */ - lib::Depend nopFunctor; + lib::Depend nopFunctor; }// (End)Implementation details diff --git a/tests/core/steam/engine/mock-dispatcher.hpp b/tests/core/steam/engine/mock-dispatcher.hpp index bd61105fc..96db84a78 100644 --- a/tests/core/steam/engine/mock-dispatcher.hpp +++ b/tests/core/steam/engine/mock-dispatcher.hpp @@ -58,7 +58,7 @@ #include "steam/mobject/model-port.hpp" #include "steam/engine/dispatcher.hpp" #include "steam/engine/job-ticket.hpp" -#include "vault/engine/job.h" +#include "vault/gear/job.h" #include "vault/real-clock.hpp" #include "lib/allocator-handle.hpp" #include "lib/time/timevalue.hpp" @@ -86,8 +86,8 @@ namespace test { using util::isSameObject; using fixture::Segmentation; using vault::RealClock; - using vault::engine::Job; - using vault::engine::JobClosure; + using vault::gear::Job; + using vault::gear::JobClosure; diff --git a/tests/core/steam/engine/mock-support-test.cpp b/tests/core/steam/engine/mock-support-test.cpp index dd907f791..f5a07590c 100644 --- a/tests/core/steam/engine/mock-support-test.cpp +++ b/tests/core/steam/engine/mock-support-test.cpp @@ -28,7 +28,7 @@ #include "lib/test/run.hpp" #include "lib/test/test-helper.hpp" #include "steam/engine/mock-dispatcher.hpp" -#include "vault/engine/nop-job-functor.hpp" +#include "vault/gear/nop-job-functor.hpp" #include "lib/iter-explorer.hpp" #include "lib/util-tuple.hpp" #include "lib/util.hpp" @@ -56,7 +56,7 @@ namespace test { * - configurable setup of a complete frame Dispatcher * @see JobPlanningPipeline_test * @see Dispatcher - * @see vault::engine::Job + * @see vault::gear::Job * @see steam::fixture::Segmentation */ class MockSupport_test : public Test @@ -130,7 +130,7 @@ namespace test { // build a render job to do nothing.... Job nopJob = JobTicket::NOP.createJobFor (frameTime); - CHECK (INSTANCEOF (vault::engine::NopJobFunctor, static_cast (nopJob.jobClosure))); //////////TICKET #1287 : fix actual interface down to JobFunctor (after removing C structs) + CHECK (INSTANCEOF (vault::gear::NopJobFunctor, static_cast (nopJob.jobClosure))); //////////TICKET #1287 : fix actual interface down to JobFunctor (after removing C structs) CHECK (nopJob.parameter.nominalTime == frameTime); InvocationInstanceID empty; ///////////////////////////////////////////////////////////////////////TICKET #1287 : temporary workaround until we get rid of the C base structs CHECK (lumiera_invokey_eq (&nopJob.parameter.invoKey, &empty)); diff --git a/tests/core/steam/engine/scheduler-interface-test.cpp b/tests/core/steam/engine/scheduler-interface-test.cpp index 0bb7e35e8..fcee26add 100644 --- a/tests/core/steam/engine/scheduler-interface-test.cpp +++ b/tests/core/steam/engine/scheduler-interface-test.cpp @@ -32,13 +32,13 @@ #include "lib/util.hpp" #include "vault/real-clock.hpp" -#include "vault/engine/scheduler-frontend.hpp" -#include "vault/engine/scheduler-diagnostics.hpp" +#include "vault/gear/scheduler-frontend.hpp" +#include "vault/gear/scheduler-diagnostics.hpp" #include "steam/engine/mock-dispatcher.hpp" -namespace vault { -namespace engine { +namespace vault{ +namespace gear { namespace test { using util::isSameObject; @@ -201,4 +201,4 @@ namespace test { /** Register this test class... */ LAUNCHER(SchedulerInterface_test, "unit engine"); -}}} // namespace vault::engine::test +}}} // namespace vault::gear::test diff --git a/tests/core/steam/fixture/fixture-segment-test.cpp b/tests/core/steam/fixture/fixture-segment-test.cpp index 008f3ef6f..edf12f166 100644 --- a/tests/core/steam/fixture/fixture-segment-test.cpp +++ b/tests/core/steam/fixture/fixture-segment-test.cpp @@ -44,7 +44,7 @@ namespace test { using engine::ExitNode; using lib::diff::MakeRec; - using engine::Job; + using vault::gear::Job; using engine::JobTicket; using engine::test::MockSegmentation; diff --git a/wiki/renderengine.html b/wiki/renderengine.html index 6ba963737..596390c6d 100644 --- a/wiki/renderengine.html +++ b/wiki/renderengine.html @@ -7044,7 +7044,7 @@ Later on we expect a distinct __query subsystem__ to emerge, presumably embeddin &rarr; QuantiserImpl -
+
//Invoke and control the dependency and time based execution of  [[render jobs|RenderJob]]//
 The Scheduler acts as the central hub in the implementation of the RenderEngine and coordinates the //processing resources// of the application. Regarding architecture, the Scheduler is located in the Vault-Layer and //running// the Scheduler is equivalent to activating the »Vault Subsystem«. An EngineFaçade acts as entrance point, providing high-level render services to other parts of the application: [[render jobs|RenderJob]] can be activated under various timing and dependency constraints. Internally, the implementation is segregated into two layers
 ;Layer-2: Control
@@ -7056,9 +7056,9 @@ The Scheduler acts as the central hub in the implementation of the RenderEngine
 !Event based vs. time based operational control
 Time bound delivery of media data is an important aspect of editing and playback -- yet other concerns are of similar importance: the ability to make optimum use of scarce resources and to complete extended processing in reasonable time, while retaining some overall responsiveness of the system. And, especially for the //final render,// it is tantamount to produce 100% correct results without any glitches -- a goal that can not be reconciled with the demand for perfect timing. These considerations alone are sufficient to indicate, that strict adherence to a pre-established calculation plan is not enough to build a viable render engine. As far as media processing is concerned, the limited I/O bandwidth is the most precious resource -- reading and writing data from persistent storage requires a lot of time, with generally unpredictable timings, necessitating asynchronous processing.
 
-This leads to the observation that every render or playback process has to deal with rather incompatible processing patterns and trends: for one, processing has to start as soon as the event of an completed I/O-operation is published, yet on the other hand, limited computational resources must be distributed and prioritised such as to deliver the completed data as close as possible to a pre-established timing deadline, under the constraint of limited in-memory buffer capacity. The //control structure// of an render engine is thus not only a time based computation plan -- first and foremost it should be conceived as an asynchronous messaging system, with the ability however to prioritise some messages based on urgency or approaching deadlines.
+This leads to the observation that every render or playback process has to deal with rather incompatible processing patterns and trends: for one, processing has to start as soon as the event of an completed I/O-operation is published, yet on the other hand, limited computational resources must be distributed and prioritised in a way suitable to deliver the completed data as close as possible to a pre-established timing deadline, under the constraint of limited in-memory buffer capacity. The //control structure// of such a render engine is thus not only a time based computation plan -- first and foremost it should be conceived as an asynchronous messaging system, with the ability however to prioritise some messages based on urgency or approaching deadlines.
 
-The time-based ordering and prioritisation of [[render activities|RenderActivity]] is thus used as a //generic medium and agent// to support and implement complex interwoven computational tasks. On the layer-1 mentioned above, a combination of a lock-free dispatch queue is used, feeding into a single threaded priority queue organised by temporal deadlines. Most render activities are lightweight and fast updates of some state flags, while some activities are extremely long running -- and those are shifted into worker threads based on priority.
+The time-based ordering and prioritisation of [[render activities|RenderActivity]] is thus used as a //generic medium and agent// to support and implement complex interwoven computational tasks. On the layer-1 mentioned above, a combination of a lock-free dispatch queue is used, feeding into a single threaded priority queue organised by temporal deadlines. Most render activities are lightweight and entail quick updates to some state flags, while certain activities are extremely long running -- and those are shifted into worker threads based on priority.
 
diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index d6adec09e..10bc78cb1 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -64862,8 +64862,29 @@ + + + + + + + + + + + + + + + + + + + + + + - @@ -75687,8 +75708,8 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- - + + @@ -76563,7 +76584,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + @@ -76593,7 +76614,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + @@ -76719,10 +76740,10 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + - - + +
@@ -77841,6 +77862,74 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ Das wäre dann eine sehr spezielle Design-Entscheidung: nicht eine passiver Threadpool, dem von einem aktiven Manager aus die Aufgaben zugewiesen werden, sondern aktive Worker, die sich selber regulieren und Arbeit holen +

+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -78506,7 +78595,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200

- + @@ -78543,7 +78632,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- +