Loading...
Searching...
No Matches
scheduleNode.h
Go to the documentation of this file.
1//
2// Copyright 2025 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_EXEC_VDF_SCHEDULE_NODE_H
8#define PXR_EXEC_VDF_SCHEDULE_NODE_H
9
11
12#include "pxr/pxr.h"
13
14#include "pxr/exec/vdf/mask.h"
15#include "pxr/exec/vdf/node.h"
17#include "pxr/exec/vdf/types.h"
18
19#include <vector>
20
21PXR_NAMESPACE_OPEN_SCOPE
22
23class VdfNode;
24class VdfOutput;
25
33class VdfScheduleOutput
34{
35public:
36 VdfScheduleOutput(const VdfOutput *o, const VdfMask &m)
37 : output(o), requestMask(m),
38 passToOutput(NULL), fromBufferOutput(NULL),
39 uniqueIndex(VdfScheduleTaskInvalid) {}
40
42 const VdfOutput *output;
43
45 VdfMask requestMask;
46
48 VdfMask affectsMask;
49
51 const VdfOutput *passToOutput;
52
54 const VdfOutput *fromBufferOutput;
55
58 VdfMask keepMask;
59
62
63};
64
73{
74public:
77
81
84};
85
94{
95public:
96 VdfScheduleNode(const VdfNode *n) :
97 node(n), outputToClear(nullptr), affective(false) {}
98
102 int GetOutputIndex(const VdfOutput *output) const {
103 size_t size = outputs.size();
104 for (size_t i = 0; i < size; ++i) {
105 if (ARCH_LIKELY(outputs[i].output == output)) {
106 return i;
107 }
108 }
109 return -1;
110 }
111
113 const VdfNode *node;
114
118
123
125 std::vector<VdfScheduleOutput> outputs;
126
128 std::vector<VdfScheduleInput> inputs;
129
130};
131
133
134PXR_NAMESPACE_CLOSE_SCOPE
135
136#endif
A VdfInput is used to connect a VdfNode to one or more VdfNodes' outputs.
Definition input.h:36
A VdfMask is placed on connections to specify the data flowing through them.
Definition mask.h:37
This is the base class for all nodes in a VdfNetwork.
Definition node.h:53
A VdfOutput represents an output on a node.
Definition output.h:32
This class contains scheduling information necessary to run a single VdfNode.
const VdfOutput * outputToClear
An output whose temporary buffer can be deallocated as soon as this schedule node has finished execut...
int GetOutputIndex(const VdfOutput *output) const
Returns the index of output in the outputs array, or -1 if it does not exist.
std::vector< VdfScheduleInput > inputs
The list of inputs scheduled for this node.
const VdfNode * node
The node being scheduled.
bool affective
Whether this node, as scheduled, is affective, meaning it cannot be ignored as an optimization while ...
std::vector< VdfScheduleOutput > outputs
The list of outputs that are being scheduled for this node.
VdfMask mask
The dependency mask, indicating which elements of the source output value this input depends on.
const VdfOutput * source
The output from which the scheduled input sources its values.
const VdfInput * input
The input corresponding to this scheduled input.
This class contains scheduling information for an input.
uint32_t VdfScheduleInputDependencyUniqueIndex
A sequential index assigned to the unique output and mask combination of a VdfScheduleInputDependency...