This namespace contains the API of the nodes framework.
Namespaces | |
details | |
Classes | |
struct | PortInfo |
class | CoreNodeBaseInterface |
class | CoreNodeInterface |
class | MicroNodeGroupInterface |
class | CoreNodeGroupInterface |
class | ConversionNode |
class | ConversionSequence |
class | ConstructionErrorInterface |
class | PortTypeConstructionErrorInterface |
class | CoreNodeErrorHelper |
class | PortId |
class | InPortId |
class | OutPortId |
class | IdBuilder |
class | IdOrBuilder |
struct | OperatorNodeLlvmBase |
struct | OperatorNodeLlvm |
class | OperatorNode |
class | OperatorNode< OP, RESULT(IN...)> |
class | MicroNode |
class | CoreNodeInstanceBaseInterface |
class | MicroNodePtr |
class | VariadicPort |
class | MicroNodeInterface |
class | CoreNodeInstanceInterface |
struct | OptimizationInfo |
struct | ShortCircuitRule |
class | CoreNodesLib |
class | VariableBase |
class | VirtualInputPort |
class | VariableMicroNode |
class | BasicMicroNode |
class | BatchMicroNode |
struct | UnannotatedType |
class | MicroNodeRuntime |
class | RuntimeErrorInterface |
class | FrameData |
class | VarAccess |
class | ContainerVarAccess |
class | BatchVarAccess |
Typedefs | |
using | CoreNodeFactory = Factory< CoreNode(const DataDictionary &)> |
using | Optimizer = Delegate< Result< Opt< OptimizationInfo > >(const CoreNode &node, const Block< const Tuple< TrivialDataPtr, CORENODE_PORT_FLAGS > > &args)> |
template<typename TO , typename FROM > | |
using | ConversionNodeBase = OperatorNode< ConversionNode< TO, FROM >, TO(FROM)> |
using | PortError = Tuple< PortId, Error > |
using | PortsDescriptionCallback = void(*)(PortsDescription *) |
using | LlvmGlobalsReceiver = Delegate< Result< void >(const CString &name, const CString &decl, void *address)> |
Enumerations | |
enum class | ACCESS_INDEX : Int { UNUSED , INDEX_0 , INDEX_1 , INDEX_2 , INDEX_3 } |
enum class | WIRETYPE { NONE , FLOW , DOMAIN , HIERARCHY , PURE_VALUE , STATE_VALUE , VALUE , DOMAIN_FLOW , DOMAIN_FLOW_VALUE , DOMAIN_FLOW_PURE_VALUE , LIFETIME , DEEPLY_SEQUENCED , SEQUENCED , DOMAIN_FLOW_SEQUENCED , DOMAIN_FLOW_VALUE_SEQUENCED , DOMAIN_FLOW_PURE_VALUE_SEQUENCED , DOMAIN_FLOW_SEQUENCED_LIFETIME , DOMAIN_FLOW_VALUE_SEQUENCED_LIFETIME , DOMAIN_FLOW_PURE_VALUE_SEQUENCED_LIFETIME , INDUCED_SEQUENCED , CONTROL_BLOCK , STATE , ALIAS , MARK , RECURSION , MEMBER_ALIAS , LAZY , TRG_MARK , BLOCK_NESTING , SUBTRACTIVE_DOMAIN , ELEMENT_DOMAIN , MATCH_DOMAIN , INDUCED_DOMAIN , FIX_DOMAIN , CONDITIONAL_DOMAIN , INTERSECTION_DOMAIN , FLAG_MASK , INDUCED_MASK , DOMAIN_MASK , PORT , ACCESS_TEST , DEPENDENCY_TEST , ALL , DEFAULT_INPUT , DEFAULT_OUTPUT } |
Functions | |
template<typename N , typename... ARGS> | |
Result< CoreNode > | CreateNode (const Id &nodeId, ARGS &&... args) |
template<typename N > | |
Result< CoreNode > | CreateNode () |
MAXON_REGISTRY (CoreNodeFactory, CoreNodes, "net.maxon.corenode.registry.corenodes") | |
template<typename CORENODE > | |
Result< CoreNodeFactory > | CreateCoreNodeFactory (DataDictionary &&meta=DataDictionary()) |
template<typename DEST , typename SRC > | |
MAXON_WARNING_POP CONVERSION_FLAGS | GetScalarConversionFlags () |
enum maxon::corenodes::ACCESS_INDEX Int | MAXON_ENUM_LIST (ACCESS_INDEX) |
enum maxon::corenodes::WIRETYPE | MAXON_ENUM_FLAGS (WIRETYPE) |
MAXON_DATATYPE (PortId, "net.maxon.corenode.datatype.portid") | |
template<typename T > | |
const DataType & | GetPortType () |
String | ToString (const NodeHandle *h, const FormatStatement *fs, Bool checkDataType=true) |
MAXON_DATATYPE (OptimizationInfo, "net.maxon.corenode.datatype.optimizationinfo") | |
template<typename PORTIDTYPE > | |
constexpr UInt | GetPortHashCodeHelper (PORTIDTYPE const &inId) |
constexpr UInt | GetPortHashCodeHelper (LiteralId const &inId) |
template<Int LENGTH> | |
constexpr UInt | GetPortHashCodeHelper (const char(&inId)[LENGTH]) |
Variables | |
constexpr MAXON_WARNING_PUSH LiteralId | CORENODE_CONVERT_BASEID |
class maxon::corenodes::PortId | MAXON_ENUM_FLAGS |
using CoreNodeFactory = Factory<CoreNode(const DataDictionary&)> |
A CoreNodeFactory creates a CoreNode given a set of arguments in a DataDictionary. The supported arguments are specific for the core node, some common arguments are defined in CoreNodeBaseInterface such as CoreNodeBaseInterface::Type.
using Optimizer = Delegate<Result<Opt<OptimizationInfo> >(const CoreNode& node, const Block<const Tuple<TrivialDataPtr, CORENODE_PORT_FLAGS> >& args)> |
A CoreNode may have an optimizer to provide an optimized handling of the core node given a set of values of its input ports which are known at compile-time.
At compile-time the optimizer is called with the node to optimize and the values of all input ports as arguments, where an empty TrivialDataPtr indicates an unknown (dynamic) value. If an optimization is possible the necessary information is returned in an OptimizationInfo.
To set an optimizer for a core node you have to set the CoreNodeInterface::Optimizer attribute either directly on the core node (CoreNodeBaseInterface::SetValue) or as meta data of the CoreNodeFactory. The latter can be done with the help of MAXON_CORENODE_REGISTER_WITH_METADATA. Also if you use one of the MAXON_CORENODE_REGISTER macros and the core node implementation class has a static Optimize function
this will be used automatically as optimizer.
There is the method CoreNodesLib::CreateOptimizer which returns an optimizer given a number of ShortCircuitRules.
using ConversionNodeBase = OperatorNode<ConversionNode<TO, FROM>, TO(FROM)> |
using PortsDescriptionCallback = void(*)(PortsDescription*) |
using LlvmGlobalsReceiver = Delegate<Result<void>(const CString& name, const CString& decl, void* address)> |
|
strong |
When a port or micro node is connected to a micro node, the access index tells at which index the MicroNode receives the connection's transported value within the Ports/Batch parameter of the Process method. For indices exceeding INDEX_3 just cast from Int to ACCESS_INDEX. There are also some built-in micro nodes with several parameter connections, they use the access index to identify which connection controls which parameter. Each access index (other than UNUSED) may be used by at most one connection of a micro node.
|
strong |
Core nodes and micro nodes instances and their ports can be connected by wires. The wires are given as a set of WIRETYPE flags.
Creates a core node from class N. The class N has to contain an Init function where the first parameter is either a MicroNodeGroupRef or a CoreNodeGroupRef and the remaining parameters (if any) have to match the given args. For an example of such a class have a look at MicroNodeGroupInterface.
N | The class which implements the node. It has to contain an Init function with either a MicroNodeGroupRef or a CoreNodeGroupRef as first parameter. |
[in] | nodeId | The identifier to use for the node. This may be left empty. |
[in] | args | Optional arguments for the Init function. |
Result<CoreNode> maxon::corenodes::CreateNode | ( | ) |
Creates a core node from class N. The class N has to contain an Init function which takes a single parameter of type MicroNodeGroupRef or CoreNodeGroupRef. For an example of such a class have a look at MicroNodeGroupInterface. To create a node with additional arguments see the other CreateNode function.
N | The class which implements the node. It has to contain an Init function with either a MicroNodeGroupRef or a CoreNodeGroupRef as parameter. |
maxon::corenodes::MAXON_REGISTRY | ( | CoreNodeFactory | , |
CoreNodes | , | ||
"net.maxon.corenode.registry.corenodes" | |||
) |
The registry for core node factories. You can use one of the MAXON_CORENODE_REGISTER macros to register a core node factory.
Result<CoreNodeFactory> maxon::corenodes::CreateCoreNodeFactory | ( | DataDictionary && | meta = DataDictionary() | ) |
MAXON_WARNING_POP CONVERSION_FLAGS maxon::corenodes::GetScalarConversionFlags | ( | ) |
Call to read the conversion flags that are appropriate for converting a scalar type into another.
DEST | Destination scalar type. |
SRC | Source scalar type. |
enum maxon::corenodes::ACCESS_INDEX Int maxon::corenodes::MAXON_ENUM_LIST | ( | ACCESS_INDEX | ) |
enum maxon::corenodes::WIRETYPE maxon::corenodes::MAXON_ENUM_FLAGS | ( | WIRETYPE | ) |
maxon::corenodes::MAXON_DATATYPE | ( | PortId | , |
"net.maxon.corenode.datatype.portid" | |||
) |
const DataType& maxon::corenodes::GetPortType | ( | ) |
String maxon::corenodes::ToString | ( | const NodeHandle * | h, |
const FormatStatement * | fs, | ||
Bool | checkDataType = true |
||
) |
maxon::corenodes::MAXON_DATATYPE | ( | OptimizationInfo | , |
"net.maxon.corenode.datatype.optimizationinfo" | |||
) |
|
constexpr |
Helper to extract a constexpr hash value from a variety of port name types.
[in] | inId | MAXON_ATTRIBUTE id. |
Helper to extract a constexpr hash value from a variety of port name types.
[in] | inId | Literal id string (usually constexpr). |
|
constexpr |
Helper to extract a constexpr hash value from a variety of port name types.
LENGTH | String length (deduced). |
[in] | inId | Hardcoded id string. |
|
constexpr |
class maxon::corenodes::PortId MAXON_ENUM_FLAGS |