|
HDK
|
#include <context.h>
Public Member Functions | |
| VdfContext (const VdfContext &rhs)=delete | |
| VdfContext & | operator= (const VdfContext &rhs)=delete |
| VdfContext (const VdfEvaluationState &state, const VdfNode &node) | |
| VdfContext (const VdfEvaluationState &state, const VdfNode &node, const VdfScheduleTaskIndex invocation) | |
| template<typename T > | |
| VdfByValueOrConstRef< T > | GetInputValue (const TfToken &name) const |
| template<typename T > | |
| const T * | GetInputValuePtr (const TfToken &name) const |
| template<typename T > | |
| const T * | GetInputValuePtr (const TfToken &name, const T *defPtr) const |
| template<typename T > | |
| bool | HasInputValue (const TfToken &name) const |
| VDF_API bool | IsOutputRequested (const TfToken &outputName) const |
| template<typename T > | |
| void | SetOutput (const TfToken &outputName, const T &value) const |
| template<typename T > | |
| void | SetOutput (const T &value) const |
| template<typename T > | |
| void | SetOutput (T &&value) const |
| template<typename T > | |
| void | SetOutput (const TfToken &outputName, T &&value) const |
| VDF_API void | SetEmptyOutput () const |
| VDF_API void | SetEmptyOutput (const TfToken &outputName) const |
| VDF_API void | SetOutputToReferenceInput (const TfToken &inputName) const |
Error Reporting | |
| VDF_API void | Warn (const char *fmt,...) const ARCH_PRINTF_FUNCTION(2 |
Debugging | |
| VDF_API std::string | GetNodeDebugName () const |
| VDF_API void | CodingError (const char *fmt,...) const ARCH_PRINTF_FUNCTION(2 |
Friends | |
| class | VdfIterator |
| class | VdfSpeculationNode |
A context is the parameter bundle passed to callbacks of computations. It is the only API through which functions have access to their inputs.
|
delete |
|
inline |
Constructs a VdfContext for the given node with the current evaluation state.
|
inline |
Constructs a VdfContext for the given node and node invocation with the current evaluation state.
Invokes a coding error with an error message and a graph around the node that this context is currently referencing. It takes a printf-style format specification.
|
inline |
| VDF_API std::string VdfContext::GetNodeDebugName | ( | ) | const |
Returns the debug name for the node for this context.
|
inline |
Returns true if the output named outputName is requested by at least one downstream node, or false if there are no consumers for the output or if outputName isn't a valid output on this node.
This can be used by the node callback to avoid computing expensive outputs that are not needed.
NOTE: It's far preferred for computations to be designed with appropriate granularity, but this may be used in cases where the computation of multiple outputs isn't feasibly separable.
|
delete |
Sets an empty value on the output.
It is invalid to call this method on any node that does not have exactly one output.
Sets an empty value on the output named outputName.
|
inline |
Sets the value of the output named outputName to value.
This can be used when the node already has all the answers and doesn't want to bother with iterators.
Note that this method currently always performs a full copy, because it can't tell if we are allowed to take ownership of the given output.
Sets the value of the output to value.
This can be used when the node already has all the answers and doesn't want to bother with iterators.
Note that this method currently always performs a full copy, because it can't tell if we are allowed to take ownership of the given output.
It is invalid to call this method on any node that does not have exactly one output.
Sets the value of the output to value.
This can be used when the node already has all the answers and doesn't want to bother with iterators.
This method moves the data into the output, and thus avoids a copy. However, note that value will no longer contain any meaningful data after this method returned.
It is invalid to call this method on any node that does not have exactly one output.
|
inline |
Sets the value of the output named outputName to value.
This can be used when the node already has all the answers and doesn't want to bother with iterators.
This method moves the data into the output, and thus avoids a copy. However, note that value will no longer contain any meaningful data after this method returned.
Sets the one and only output to have the same output value as the value on the output connected to input inputName.
Calling this method when the input doesn't need to be modified gives the system an opportunity to apply some optimizations when possible.
Note that this optimization might not take effect in certain circumstances.
Reports a warning to the system that was encountered at runtime.
Exactly how the warning is presented to the user, if at all, is up to the host system.
Multiple calls to Warn() from the same node will cause the messages to be concatenated.
|
friend |
|
friend |