|
HDK
|
Contains a specification of how to execute a particular VdfNetwork. More...
#include <schedule.h>
Classes | |
| class | IteratorRange |
| class | OutputId |
Public Types | |
| using | ScheduleNodeVector = std::vector< VdfScheduleNode > |
| using | TaskIdRange = IteratorRange< Vdf_CountingIterator< VdfScheduleTaskId >> |
| using | InputDependencyRange = IteratorRange< std::vector< VdfScheduleInputDependency >::const_iterator > |
| using | InputsRange = IteratorRange< std::vector< VdfScheduleInput >::const_iterator > |
Friends | |
| class | VdfScheduler |
Contains a specification of how to execute a particular VdfNetwork.
Contains ordering and dependency information about the nodes in a network.
Definition at line 40 of file schedule.h.
| using VdfSchedule::InputDependencyRange = IteratorRange<std::vector<VdfScheduleInputDependency>::const_iterator> |
An iterable range of input dependencies.
Definition at line 79 of file schedule.h.
| using VdfSchedule::InputsRange = IteratorRange<std::vector<VdfScheduleInput>::const_iterator> |
An iterable range of scheduled inputs.
Definition at line 84 of file schedule.h.
| using VdfSchedule::ScheduleNodeVector = std::vector<VdfScheduleNode> |
The type for the vector of schedule nodes in the schedule.
Definition at line 70 of file schedule.h.
An iterable range of task ids.
Definition at line 74 of file schedule.h.
|
delete |
Noncopyable.
| VDF_API VdfSchedule::VdfSchedule | ( | ) |
Constructs an empty schedule.
| VDF_API VdfSchedule::~VdfSchedule | ( | ) |
Destructor
| VDF_API void VdfSchedule::AddInput | ( | const VdfConnection & | connection, |
| const VdfMask & | mask | ||
| ) |
Adds the input targeted by the given connection to the schedule. The specified mask indicates which data elements the input depends on.
Clears the schedule.
This marks the schedule as invalid and is no longer suitable for execution.
Consolidates scheduled input entries added by AddInput.
Ensures that each pair of scheduled input and source output has a unique entry that accumulates the masks passed to AddInput. The scheduler is responsible for calling this method after all inputs have been added and before any call to GetInputs.
| VDF_API void VdfSchedule::ForEachScheduledOutput | ( | const VdfNode & | node, |
| const VdfScheduledOutputCallback & | callback | ||
| ) | const |
Loops over each scheduled output of node and calls callback with the output and request mask in an efficient manner.
Returns the affects mask associated with the given OutputId.
|
inline |
Returns the compute task associated with the given task index.
Definition at line 431 of file schedule.h.
|
inline |
Returns a range of ids describing compute tasks associated with the given node.
Definition at line 402 of file schedule.h.
|
inline |
Returns an iterable range of task indices given an input dependency.
Definition at line 413 of file schedule.h.
Returns the "from buffer's" output associated with the given OutputId.
| VDF_API InputsRange VdfSchedule::GetInputs | ( | const VdfNode & | node | ) | const |
Returns a range of inputs scheduled for the given node. Note that not all inputs in the network are also scheduled for the node.
|
inline |
Returns the inputs task associated with the given task index.
Definition at line 439 of file schedule.h.
Returns the keep mask associated with the given OutputId.
|
inline |
Returns the keep mask for the given node invocation index.
Definition at line 334 of file schedule.h.
|
inline |
Returns an index to the keep task associated with the given node.
Definition at line 422 of file schedule.h.
|
inline |
Returns the network for this schedule.
Definition at line 178 of file schedule.h.
|
inline |
Returns the total number of compute tasks in the schedule.
Definition at line 377 of file schedule.h.
|
inline |
Returns the total number of inputs tasks in the schedule.
Definition at line 383 of file schedule.h.
|
inline |
Returns the total number of keep tasks in the schedule.
Definition at line 395 of file schedule.h.
|
inline |
Returns the total number of prep tasks in the schedule.
Definition at line 389 of file schedule.h.
|
inline |
Returns the number of unique input dependencies created for the scheduled task graph. Each unique input dependency refers to the same output and mask combination.
Definition at line 371 of file schedule.h.
|
inline |
Returns an iterable range of optional (i.e. dependent on prereq results) input dependencies for the given inputs task.
Definition at line 458 of file schedule.h.
Similar to GetOutputId, but creates an OutptuId if none exists, effectively adding the output to the schedule. So you want to be very careful how you use this method.
Gets an OutputId identifying the first scheduled output for the given node, if any. The returned OutputId may be invalid if there are no scheduled outputs for node.
Note that node must be scheduled for this API to work, cf. IsScheduled().
Rather than calling this method directly, consider using VDF_FOR_EACH_SCHEDULED_OUTPUT_ID(...) instead.
Gets an OutputId identifying the "end" of the scheduled outputs for a node. This OutputId should never be used to query the schedule, as it never represents a particular scheduled output. See GetOutputIdsBegin().
Note that node must be scheduled for this API to work, cf. IsScheduled().
Rather than calling this method directly, consider using VDF_FOR_EACH_SCHEDULED_OUTPUT_ID(...) instead.
Returns the output whose temporary buffer can be immediately deallocated after node has finished executing.
Returns the "pass to" output associated with the given OutputId.
|
inline |
Returns an iterable range of prereq input dependencies for the given inputs task.
Definition at line 448 of file schedule.h.
|
inline |
Returns the request for this schedule.
Definition at line 496 of file schedule.h.
| VDF_API void VdfSchedule::GetRequestAndAffectsMask | ( | const OutputId & | outputId, |
| const VdfMask ** | requestMask, | ||
| const VdfMask ** | affectsMask | ||
| ) | const |
Returns pointers to the request and affects masks simultaneously, saving on the overhead of making two queries when client code just needs both masks.
|
inline |
Returns pointers to the request and affects masks for the given node invocation index.
Definition at line 313 of file schedule.h.
Returns the request mask associated with the given OutputId.
|
inline |
Returns the request mask for the given node invocation.
Definition at line 294 of file schedule.h.
|
inline |
Returns an iterable range of required (i.e. read/writes and reads not dependent on prereqs) input dependencies for the given compute task.
Definition at line 468 of file schedule.h.
|
inline |
Returns a set of bits where each set bit's index corresponds to the node index of a node in this schedule.
Definition at line 521 of file schedule.h.
Returns the node index of the schedule node associated with the given outputId.
Definition at line 514 of file schedule.h.
|
inline |
Returns the vector of schedule nodes in this schedule.
It is never appropriate to access the vector of schedule nodes directly except during scheduling.
Definition at line 503 of file schedule.h.
|
inline |
Returns whether this schedule is small enough to avoid overhead incurred by the _nodesToIndexMap mapping, which is otherwise of great benefit to schedule node lookup time.
Definition at line 507 of file schedule.h.
| VDF_API VdfScheduleInputDependencyUniqueIndex VdfSchedule::GetUniqueIndex | ( | const OutputId | outputId | ) | const |
Returns the unique index assigned to the output.
|
inline |
Returns true if this schedule participates in sparse mung buffer locking.
Definition at line 353 of file schedule.h.
| VDF_API void VdfSchedule::InitializeFromNetwork | ( | const VdfNetwork & | network | ) |
Initializes structures based on the size of the network.
Returns true if the output is expected to have an effect on its corresponding input, and false otherwise.
Outputs that don't have an 'affects' mask or a corresponding input are always considered to affect their data.
Returns whether this schedule includes node in any way.
|
inline |
Returns whether this schedule is small enough to avoid overhead incurred by the _nodesToIndexMap mapping, which is otherwise of great benefit to schedule node lookup time.
Definition at line 487 of file schedule.h.
|
inline |
Returns whether or not this schedule is valid and can be used for execution.
Definition at line 172 of file schedule.h.
|
delete |
Registers an affects mask for the output indicated by outputId.
| VDF_API void VdfSchedule::SetFromBufferOutput | ( | const OutputId & | outputId, |
| const VdfOutput * | output | ||
| ) |
Registers a "from buffer" for the output indicated by outputId.
|
inline |
Enables SMBL for this schedule.
Definition at line 561 of file schedule.h.
Registers a keep mask for the output indicated by outputId.
| VDF_API void VdfSchedule::SetOutputToClear | ( | const VdfNode & | node, |
| const VdfOutput * | outputToClear | ||
| ) |
Registers an output whose temporary buffer can be eagerly cleared as soon as node has finished executing.
Registers a "pass to" output for the output indicated by outputId.
| VDF_API void VdfSchedule::SetRequest | ( | const VdfRequest & | request | ) |
Sets the request that was used to make up this schedule.
Registers a request mask for the output indicated by outputId.
|
friend |
Definition at line 571 of file schedule.h.