maxon::corenodes Namespace Reference

Namespaces

  details

Classes

class   BasicMicroNode
class   BatchMicroNode
class   BatchVarAccess
class   ContainerVarAccess
class   ConversionNode
class   ConversionSequence
class   CoreNodeBaseInterface
class   CoreNodeGroupInterface
class   CoreNodeInstanceBaseInterface
class   CoreNodeInstanceInterface
class   CoreNodeInterface
class   CoreNodesLib
class   FrameData
class   IdBuilder
class   IdOrBuilder
class   InPortId
class   MicroNode
class   MicroNodeGroupInterface
class   MicroNodeInterface
class   MicroNodePtr
class   MicroNodeRuntime
class   OperatorNode
class   OperatorNode< OP, RESULT(IN...)>
struct   OperatorNodeLlvm
struct   OperatorNodeLlvmBase
struct   OptimizationInfo
class   OutPortId
class   PortId
struct   PortInfo
struct   ShortCircuitRule
struct   UnannotatedType
class   VarAccess
class   VariableBase
class   VariableMicroNode
class   VariadicPort
class   VirtualInputPort

Typedefs

using  CoreNodeFactory = Factory< CoreNode(const DataDictionary &)>
using  Optimizer = Delegate < Result < Opt < OptimizationInfo > >(const CoreNode &node, const Block < const Tuple < ConstDataPtr , PORT_FLAGS > > &args)>
using  PortsDescriptionCallback = void(*)(PortsDescription *)
using  LlvmGlobalsReceiver = Delegate < Result < void >(const CString &name, const CString &decl, void *address)>

Enumerations

enum   ACCESS_INDEX : Int {
   UNUSED ,
   INDEX_0 ,
   INDEX_1 ,
   INDEX_2 ,
   INDEX_3
}
enum   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 ,
   PASSTHROUGH ,
   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
}
enum   PORT_FLAGS {
   NONE ,
   INPUT_WITHOUT_VALUE ,
   OUTPUT_UNUSED
}

函数

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 )
enum maxon::corenodes::PORT_FLAGS   MAXON_ENUM_FLAGS ( PORT_FLAGS )
template<typename T >
const DataType GetPortType ()
  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])

变量

constexpr MAXON_WARNING_PUSH LiteralId   CORENODE_CONVERT_BASEID
class maxon::corenodes::PortId   MAXON_ENUM_FLAGS
struct maxon::corenodes::OptimizationInfo   MAXON_ENUM_FLAGS_CLASS

Typedef Documentation

◆  CoreNodeFactory

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.

◆  Optimizer

using Optimizer = Delegate < Result < Opt < OptimizationInfo > >(const CoreNode& node, const Block <const Tuple < ConstDataPtr , 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 ConstDataPtr 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

static Result<Opt<OptimizationInfo>> Optimize( const CoreNode& node, const Block< const Tuple<ConstDataPtr, PORT_FLAGS>>& args);

this will be used automatically as optimizer.

There is the method CoreNodesLib::CreateOptimizer which returns an optimizer given a number of ShortCircuitRules.

◆  PortsDescriptionCallback

using PortsDescriptionCallback = void(*)(PortsDescription*)

◆  LlvmGlobalsReceiver

using LlvmGlobalsReceiver = Delegate < Result <void>(const CString & name, const CString & decl, void* address)>

Enumeration Type Documentation

◆  ACCESS_INDEX

enum ACCESS_INDEX : Int
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.

Enumerator
UNUSED 

The value isn't part of the Ports/Batch parameter of the Process method.

INDEX_0 

The value is accessed at index 0.

INDEX_1 

The value is accessed at index 1.

INDEX_2 

The value is accessed at index 2.

INDEX_3 

The value is accessed at index 3.

◆  WIRETYPE

enum WIRETYPE
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.

Enumerator
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 
PASSTHROUGH 
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 

◆  PORT_FLAGS

enum PORT_FLAGS
strong
Enumerator
NONE 
INPUT_WITHOUT_VALUE 
OUTPUT_UNUSED 

Function Documentation

◆  CreateNode() [1/2]

Result <CoreNode> maxon::corenodes::CreateNode ( const Id nodeId ,
ARGS &&...  args  
)

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 .

Template Parameters
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.
返回
The created, finalized node.

◆  CreateNode() [2/2]

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.

Template Parameters
N The class which implements the node. It has to contain an Init function with either a MicroNodeGroupRef or a CoreNodeGroupRef as parameter.
返回
The created, finalized node.

◆  MAXON_REGISTRY()

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.

◆  CreateCoreNodeFactory()

Result < CoreNodeFactory > maxon::corenodes::CreateCoreNodeFactory ( DataDictionary &&  meta = DataDictionary() )

◆  GetScalarConversionFlags()

MAXON_WARNING_POP CONVERSION_FLAGS maxon::corenodes::GetScalarConversionFlags ( )

Call to read the conversion flags that are appropriate for converting a scalar type into another.

另请参阅
MAXON_CORENODE_REGISTER_CONVERSION .
Template Parameters
DEST Destination scalar type.
SRC Source scalar type.
返回
The chosen conversion flags.

◆  MAXON_ENUM_LIST()

enum maxon::corenodes::ACCESS_INDEX Int maxon::corenodes::MAXON_ENUM_LIST ( ACCESS_INDEX   )

◆  MAXON_ENUM_FLAGS() [1/2]

enum maxon::corenodes::WIRETYPE maxon::corenodes::MAXON_ENUM_FLAGS ( WIRETYPE   )

◆  MAXON_ENUM_FLAGS() [2/2]

enum maxon::corenodes::PORT_FLAGS maxon::corenodes::MAXON_ENUM_FLAGS ( PORT_FLAGS   )

◆  GetPortType()

const DataType & maxon::corenodes::GetPortType ( )

◆  MAXON_DATATYPE()

maxon::corenodes::MAXON_DATATYPE ( OptimizationInfo   ,
"net.maxon.corenode.datatype.optimizationinfo"   
)

◆  GetPortHashCodeHelper() [1/3]

constexpr UInt maxon::corenodes::GetPortHashCodeHelper ( PORTIDTYPE const &  inId )
constexpr

Helper to extract a constexpr hash value from a variety of port name types.

参数
[in] inId MAXON_ATTRIBUTE id.
返回
The resulting hash code.

◆  GetPortHashCodeHelper() [2/3]

constexpr UInt maxon::corenodes::GetPortHashCodeHelper ( LiteralId const &  inId )
constexpr

Helper to extract a constexpr hash value from a variety of port name types.

参数
[in] inId Literal id string (usually constexpr).
返回
The resulting hash code.

◆  GetPortHashCodeHelper() [3/3]

constexpr UInt maxon::corenodes::GetPortHashCodeHelper ( const char(&)  inId [LENGTH] )
constexpr

Helper to extract a constexpr hash value from a variety of port name types.

Template Parameters
LENGTH String length (deduced).
参数
[in] inId Hardcoded id string.
返回
The resulting hash code.

Variable Documentation

◆  CORENODE_CONVERT_BASEID

constexpr MAXON_WARNING_PUSH LiteralId CORENODE_CONVERT_BASEID
constexpr

◆  MAXON_ENUM_FLAGS

class maxon::corenodes::PortId MAXON_ENUM_FLAGS

◆  MAXON_ENUM_FLAGS_CLASS

struct maxon::corenodes::OptimizationInfo MAXON_ENUM_FLAGS_CLASS