|
HDK
|
This is a data manager for executors that uses data stored in a vector indexed by output ids. Note that all methods on this data manager are thread-safe unless specifically called out to not be thread-safe in their documentation. More...
#include <parallelDataManagerVector.h>
Inheritance diagram for VdfParallelDataManagerVector:Public Types | |
| typedef VdfParallelExecutorDataManager < VdfParallelDataManagerVector > | Base |
| typedef Vdf_ParallelExecutorDataManagerTraits < VdfParallelDataManagerVector > ::DataHandle | DataHandle |
Public Types inherited from VdfParallelExecutorDataManager< VdfParallelDataManagerVector > | |
| typedef Vdf_ParallelExecutorDataManagerTraits < VdfParallelDataManagerVector > ::DataHandle | DataHandle |
| typedef Vdf_ParallelExecutorDataManagerInterface < VdfParallelDataManagerVector, DataHandle > | Base |
This is a data manager for executors that uses data stored in a vector indexed by output ids. Note that all methods on this data manager are thread-safe unless specifically called out to not be thread-safe in their documentation.
Definition at line 51 of file parallelDataManagerVector.h.
| typedef VdfParallelExecutorDataManager<VdfParallelDataManagerVector> VdfParallelDataManagerVector::Base |
The base class
Definition at line 60 of file parallelDataManagerVector.h.
| typedef Vdf_ParallelExecutorDataManagerTraits< VdfParallelDataManagerVector>::DataHandle VdfParallelDataManagerVector::DataHandle |
The data handle type from the type traits class.
Definition at line 67 of file parallelDataManagerVector.h.
|
inline |
Constructor.
Definition at line 71 of file parallelDataManagerVector.h.
| VDF_API VdfParallelDataManagerVector::~VdfParallelDataManagerVector | ( | ) |
Destructor.
Clears all the data from this manager.
This method is not thread-safe. It must be invoked during quiescent state only.
Clears the executor data for a specific output
This method is not thread-safe. It must be invoked during quiescent state only.
|
inline |
Returns an existing data handle for the given outputId. This method will return an invalid data handle, if no handle has been created for the given output.
Definition at line 113 of file parallelDataManagerVector.h.
|
inline |
Returns the VdfExecutorInvalidationData associated with the given handle.
Note it is undefined behavior to call this method with an invalid data handle.
Definition at line 218 of file parallelDataManagerVector.h.
|
inline |
Returns the VdfInvalidationTimestamp associated with the given handle.
Note it is undefined behavior to call this method with an invalid data handle.
Definition at line 233 of file parallelDataManagerVector.h.
|
inline |
Returns an existing data handle, or creates a new one for the given outputId.
This method is guaranteed to return a valid data handle.
This method is not thread-safe when invoken with the same output parameter from multiple threads. It is safe to call this method with concurrently, with different output parameters.
Definition at line 105 of file parallelDataManagerVector.h.
|
inline |
Returns the VdfExecutorBufferData associated with the given handle.
Note it is undefined behavior to call this method with an invalid data handle.
Definition at line 124 of file parallelDataManagerVector.h.
|
inline |
Returns the VdfExecutorBufferData associated with the given handle.
Note it is undefined behavior to call this method with an invalid data handle.
Definition at line 142 of file parallelDataManagerVector.h.
|
inline |
Returns the VdfExecutorBufferData associated with the given handle.
Note it is undefined behavior to call this method with an invalid data handle.
Definition at line 133 of file parallelDataManagerVector.h.
|
inline |
Returns the transferred VdfExecutorBufferData associated with the given handle. This method will return nullptr, if no value has been written back to this output.
Note it is undefined behavior to call this method with an invalid data handle.
Definition at line 177 of file parallelDataManagerVector.h.
|
inline |
Returns true if this data manager is empty.
Definition at line 288 of file parallelDataManagerVector.h.
|
inline |
Returns true if the data at the given outputId has been touched by evaluation.
Definition at line 252 of file parallelDataManagerVector.h.
|
inline |
Returns true if the given data handle is valid, i.e. it is valid to ask for data for this given handle.
Note that attempting to resolve data at an invalid handle results in undefined behavior.
Definition at line 92 of file parallelDataManagerVector.h.
|
inline |
Publishes the private VdfExecutorBufferData, and retains the previously public VdfExecutorBufferData. After this method returns, clients may still read from the private data, but are no longer allowed to mutate it.
Note it is undefined behavior to call this method with an invalid data handle.
Definition at line 154 of file parallelDataManagerVector.h.
|
inline |
Publishes the scratch VdfExecutorBufferData, and retains the previously public VdfExecutorBufferData. After this method returns, clients may still read from the scratch data, but are no longer allowed to mutate it.
Note it is undefined behavior to call this method with an invalid data handle.
Definition at line 166 of file parallelDataManagerVector.h.
|
inline |
Resets the transferred buffer associated with the given handle. If any value has previously been written back to this output, its storage will be freed.
Note it is undefined behavior to call this method with an invalid data handle.
Definition at line 208 of file parallelDataManagerVector.h.
| VDF_API void VdfParallelDataManagerVector::Resize | ( | const VdfNetwork & | network | ) |
Resize the data manager to accommodate the given network.
This method is not thread-safe. It can only be called during quiescent state.
|
inline |
Sets the invalidation timestamp for the give data handle.
Note it is undefined behavior to call this method with an invalid data handle.
Definition at line 243 of file parallelDataManagerVector.h.
Marks the data at the given outputId as having been touched by evaluation.
Definition at line 259 of file parallelDataManagerVector.h.
|
inline |
Transfers ownership of the value to the output associated with handle. Returns true if the transfer of ownership was successful. If the transfer of ownership was successful, the responsibility of lifetime management for value transfers to this data manager. Otherwise, the call site maintains this responsibility.
Note that only one value can be transferred to each output. Subsequent attempts to transfer will fail for that output.
Note it is undefined behavior to call this method with an invalid data handle.
Definition at line 194 of file parallelDataManagerVector.h.
|
inline |
Marks the data at the given outputId as not having been touched by evaluation. Returns true if the data has previously been touched.
Definition at line 266 of file parallelDataManagerVector.h.