HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VdfTestUtils Namespace Reference

Classes

class  CallbackNode
 A helper class that implements a simple callback node. More...
 
class  OutputAccessor
 A helper class which enables access to a VdfOutput from a VdfContext. More...
 
class  DependencyCallbackNode
 A CallbackNode which allows for passing in a custom input / output dependency callback. More...
 
class  NodeType
 Base class for various kinds of nodes that can be created. More...
 
class  InputNodeType
 This class specifies a VdfInputVector of type T. More...
 
class  CallbackNodeType
 This class specifies a CallbackNode with a given callback function. More...
 
class  Node
 This class is a wrapper around a VdfNode. More...
 
class  Network
 This is a container class used to hold on to all the nodes and to facilitate their management. More...
 
class  ExecutionStatsProcessor
 Simple processor that processor ExecutionStats into a vector of vector of events and a vector of substats that mirrors the internal structure of ExecutionStats. More...
 
class  ExecutionStats
 Simple wrapper around ExecutionStats that allows for logging arbitrary data for testing. More...
 

Functions

std::unique_ptr
< VdfSpeculationExecutorBase
CreateSpeculationExecutor (const VdfSpeculationNode *speculationNode, const VdfExecutorInterface *parentExecutor)
 

Detailed Description

This file contains classes to facilitate network creation in unit tests.

Simple example of how to use these classes:

VdfTestUtils::Network graph; // The container for the nodes.
VdfTestUtils::CallbackNodeType outType; // The consumer node type.
// Consumer nodes read and write ints.
outType.ReadWrite<int>(_tokens->moves, _tokens->moves);
graph.AddInputVector<int>("input", 3); // Add an input node.
graph.Add("consume", outType); // Add a consumer node.
graph["input"] // Add a few input values to
.SetValue(0, 11) // the input node.
.SetValue(1, 22)
.SetValue(2, 33)
;
// Finally, connect node "input"'s default output to "consume's" moves
// input with a mask.
graph["input"] >>
graph["consume"].In(_tokens->moves, VdfMask::AllOnes(3));

Function Documentation

std::unique_ptr<VdfSpeculationExecutorBase> VdfTestUtils::CreateSpeculationExecutor ( const VdfSpeculationNode speculationNode,
const VdfExecutorInterface parentExecutor 
)
inline

Create a new test speculation executor.

Definition at line 678 of file testUtils.h.