![]() |
Lumiera 0.pre.04
»edit your freedom«
|
Specialised shorthand notation for building the Render Node network. More...
Go to the source code of this file.
Specialised shorthand notation for building the Render Node network.
During the Builder run, the Render Node network will be constructed by gradually refining the connectivity structure derived from interpreting the »high-level Model« from the current Session. At some point, it is essentially clear what data streams must be produced and what media processing functionality from external libraries will be utilised to achieve the goal. This is when the fluent builder notation defined in this header comes into play, allowing to package the fine grained and in part quite confusing details of parameter wiring and invocation preparation into some goal oriented building blocks, that can be combined and directed with greater clarity by the control structure to govern the build process.
The actual node connectivity is established by a process of gradual refinement, operating over several levels of abstraction. Each of these levels uses its associated builder and descriptor records to collect information, which is then emitted by a terminal invocation to produce the result; the higher levels thereby rely on the lower levels to fill in and elaborate the details.
Since the low-level-Model is a massive data structure comprising thousands of nodes, each with specialised parametrisation for some media handling library, and a lot of cross-linking pointers, it is important to care for efficient usage of memory with good locality. Furthermore, the higher levels of the build process will generate additional temporary data structures, refined gradually until the actual render node network can be emitted. Each builder level can thus be outfitted with a custom allocator — typically an instance of lib::AllocationCluster. Notably the higher levels can be attached to a separate AllocationCluster instance, which will be discarded once the build process is complete, while Level-2 (and below) uses the allocator for the actual target data structure, which has to be retained while the render graph is used; more specifically until a complete segment of the timeline is superseded and has been re-built.
.withAllocator<ALO> (args...)At Level-2, actual render nodes are generated. The NodeBuilder creates a suitably configured Connectivity object, which can be dropped directly into a ProcNode. Managing the storage of those Render Nodes themselves is beyond the scope of the builder; so the user of the builder is responsible for the lifecycle of generated ProcNode objects.
The binding to the actual data processing operations (usually supplied by an external library) is established by a processing-functor passed to configure the Port builder. The supported signatures of this functor are quite flexible to allow for various flavours of invocation. Data types of parameters and buffers are picked up automatically (at compile time), based on the signature of the actual function supplied. The accepted variations are described in detail here. Basically, a function can take parameters, input- and output-buffers, yet only the output-buffers are mandatory. Several elements of one kind can be passed as tuple.
Typically, a processing operation can be configured in various ways, by passing additional setup- and invocation parameters. This entails both technical aspects (like picking some specific data format), organisational concerns (like addressing a specific frame-number) and elements of artistic control, like choosing the settings of a media processing effect. Parameters will thus be collected from various sources, which leads to an additional binding step, where all these sources are retrieved and the actual parameter value or value tuple is produced. This specific parameter binding is represented as a parameter-functor. Whenever the processing-function accepts a parameter argument, optionally a such parameter-functor can be installed; this functor is supplied with the TurnoutSystem of the actual invocation, which acts as front-end to access contextual parameters.
WIP-WIP 1/2025 Node-Invocation is reworked from ground up – some parts can not be spelled out completely yet, since we have to build this tightly interlocked system of code moving bottom up, and then filling in further details later working top-down.
as of 1/2025, the Layer-3 builder seems to be beyond the current integration scope. //////////////TICKET #1389 : develop a processing builder
Definition in file node-builder.hpp.
#include "lib/error.hpp"#include "lib/nocopy.hpp"#include "steam/engine/weaving-pattern-builder.hpp"#include "steam/engine/media-weaving-pattern.hpp"#include "steam/engine/param-weaving-pattern.hpp"#include "steam/engine/proc-node.hpp"#include "steam/engine/turnout.hpp"#include "lib/several-builder.hpp"#include "lib/format-string.hpp"#include "lib/index-iter.hpp"#include <utility>#include <vector>Namespaces | |
| namespace | steam |
| Steam-Layer implementation namespace root. | |
| namespace | steam::engine |
| Lumiera's render engine core and operational control. | |
| namespace | steam::engine::anonymous_namespace{node-builder.hpp} |
Typedefs | |
| template<class POL , class I , class E = I> | |
| using | DataBuilder = lib::SeveralBuilder< I, E, POL::template Policy > |
| A builder to collect working data. | |
Classes | |
| struct | UseHeapAlloc |
| class | NodeBuilder< POL, DAT > |
| Top-level builder to create a single Render Node. More... | |
| class | PortBuilderRoot< POL, DAT > |
| Nested DSL builder scope to define a single Port for the enclosing Node. More... | |
| class | PortBuilder< POL, DAT, WAB > |
| Nested DSL-Builder context to define a regular media processing Port. More... | |
| class | ParamAgentBuilder< POL, DAT, SPEC > |
| Nested sub-Builder analogous to PortBuilder, but for building a »Param Agent Node«. More... | |
| class | ProcBuilder |
| class | LinkBuilder |
Functions | |
| template<class POL , class D0 , uint siz, class BUILD > | |
| NodeBuilder (NodeBuilder< POL, D0 > &&, SizMark< siz >, BUILD &&) -> NodeBuilder< POL, PatternData< D0, BUILD, siz > > | |
| Deduction Guide: help the compiler with deducing follow-up NodeBuilder parameters. | |
| auto | prepareNode (StrView nodeSymbol) |
| Entrance point for building actual Render Node Connectivity (Level-2) | |
| auto | retrieve (void *streamType) |
| Entrance point for defining data flows and processing steps. | |