Interface IGraphKernel<TKernelData, TKernelPortDefinition>
Interface to be implemented on a struct which represents the functor responsible for processing a node's DataInput<TDefinition, TType>s and filling out its DataOutput<TDefinition, TType>s each time Update(JobHandle) is invoked. The functor is tied to a given node type by specifying it in the NodeDefinition<TNodeData, TSimulationPortDefinition, TKernelData, TKernelPortDefinition, TKernel>.
Any fields which exist in the struct are preserved between invocations of Execute(RenderContext, TKernelData, ref TKernelPortDefinition) and represent the ongoing state of the node's kernel.
Implementing structs may be tagged with the BurstCompileAttribute to take advantage of improved performance.
Namespace: Unity.DataFlowGraph
Syntax
[JobProducerType(typeof(GraphKernel<,, >))]
public interface IGraphKernel<TKernelData, TKernelPortDefinition> : IGraphKernel where TKernelData : IKernelData where TKernelPortDefinition : IKernelPortDefinition
Type Parameters
Name | Description |
---|---|
TKernelData | |
TKernelPortDefinition |
Methods
Execute(RenderContext, TKernelData, ref TKernelPortDefinition)
Declaration
void Execute(RenderContext ctx, TKernelData data, ref TKernelPortDefinition ports)
Parameters
Type | Name | Description |
---|---|---|
RenderContext | ctx | |
TKernelData | data | |
TKernelPortDefinition | ports |