Essentia  2.1-beta6-dev
essentia::scheduler Namespace Reference

Classes

class  ReversePairCompare
 
class  NetworkNode
 
class  Network
 
class  NetworkParser
 

Typedefs

typedef std::vector< streaming::Algorithm * > AlgoVector
 
typedef std::set< streaming::Algorithm * > AlgoSet
 
typedef std::vector< NetworkNode * > NodeVector
 
typedef std::set< NetworkNode * > NodeSet
 
typedef std::stack< NetworkNode * > NodeStack
 

Functions

template<typename NodeType >
void depthFirstApply (NodeType *root, void(*nodeFunc)(NodeType *node))
 
template<typename NodeType , typename MappedType >
std::vector< MappedType > depthFirstMap (NodeType *root, MappedType(*mapFunc)(NodeType *node))
 
template<typename NodeType >
NodeType * returnIdentity (NodeType *node)
 
template<typename NodeType >
std::vector< NodeType * > depthFirstSearch (NodeType *root)
 
std::string removeNodeIdFromName (const std::string &name)
 
std::pair< NetworkNode *, std::string > getIdentityAndName (NetworkNode *node)
 
streaming::AlgorithmreturnAlgorithm (NetworkNode *node)
 
template<typename NodeType >
void adjacencyMatrix (const std::vector< std::pair< NodeType *, std::string > > &nodes, std::vector< std::vector< bool > > &adjMatrix)
 
template<typename NodeType >
void printAdjacencyMatrix (const std::vector< std::vector< bool > > &adjMatrix, const std::vector< std::pair< NodeType *, std::string > > &nodes)
 
template<typename NodeType >
bool areNetworkTopologiesEqual (NodeType *n1, NodeType *n2)
 
void deleteNetwork (const streaming::Algorithm *algo)
 
void printNetworkBufferFillState ()
 
AlgoVector computeDependencies (const streaming::Algorithm *algo)
 
AlgoVector computeNormalDependencies (const streaming::Algorithm *algo)
 
AlgoVector computeCompositeDependencies (const streaming::Algorithm *algo)
 
void cacheDependencies (streaming::Algorithm *algo)
 
AlgoSet compositeInnerAlgos (streaming::Algorithm *algo)
 
AlgoSet parentBranchInsideComposite (streaming::AlgorithmComposite *composite, streaming::Algorithm *algo)
 

Typedef Documentation

◆ AlgoSet

typedef std::set<streaming::Algorithm*> AlgoSet

◆ AlgoVector

typedef std::vector<streaming::Algorithm*> AlgoVector

◆ NodeSet

typedef std::set<NetworkNode*> NodeSet

◆ NodeStack

typedef std::stack<NetworkNode*> NodeStack

◆ NodeVector

typedef std::vector<NetworkNode*> NodeVector

Function Documentation

◆ adjacencyMatrix()

void essentia::scheduler::adjacencyMatrix ( const std::vector< std::pair< NodeType *, std::string > > &  nodes,
std::vector< std::vector< bool > > &  adjMatrix 
)

◆ areNetworkTopologiesEqual()

bool essentia::scheduler::areNetworkTopologiesEqual ( NodeType *  n1,
NodeType *  n2 
)

◆ cacheDependencies()

void essentia::scheduler::cacheDependencies ( streaming::Algorithm algo)

This function computes at once all the dependencies for the network starting at the given algorithm and caches each algorithm dependencies inside the algo instance. This means that we don't have to do this each time in the scheduler, and also avoid doing any allocation while running the network.

◆ compositeInnerAlgos()

AlgoSet essentia::scheduler::compositeInnerAlgos ( streaming::Algorithm algo)

Returns the list of all algorithms which live inside of the given composite algorithm.

◆ computeCompositeDependencies()

AlgoVector essentia::scheduler::computeCompositeDependencies ( const streaming::Algorithm algo)

◆ computeDependencies()

AlgoVector essentia::scheduler::computeDependencies ( const streaming::Algorithm algo)

◆ computeNormalDependencies()

AlgoVector essentia::scheduler::computeNormalDependencies ( const streaming::Algorithm algo)

◆ deleteNetwork()

void essentia::scheduler::deleteNetwork ( const streaming::Algorithm algo)

Delete the algorithm together with its all visible dependencies without creating a network object.

◆ depthFirstApply()

void essentia::scheduler::depthFirstApply ( NodeType *  root,
void(*)(NodeType *node)  nodeFunc 
)

◆ depthFirstMap()

std::vector<MappedType> essentia::scheduler::depthFirstMap ( NodeType *  root,
MappedType(*)(NodeType *node)  mapFunc 
)

◆ depthFirstSearch()

std::vector<NodeType*> essentia::scheduler::depthFirstSearch ( NodeType *  root)

References depthFirstMap().

◆ getIdentityAndName()

std::pair<NetworkNode*, std::string> essentia::scheduler::getIdentityAndName ( NetworkNode node)
inline

◆ parentBranchInsideComposite()

AlgoSet essentia::scheduler::parentBranchInsideComposite ( streaming::AlgorithmComposite composite,
streaming::Algorithm algo 
)

Returns the set of algorithms which are in the branch starting from the given one and going up from parent to parent. It stops whenever it goes outside of the specified composite algorithm.

◆ printAdjacencyMatrix()

void essentia::scheduler::printAdjacencyMatrix ( const std::vector< std::vector< bool > > &  adjMatrix,
const std::vector< std::pair< NodeType *, std::string > > &  nodes 
)

◆ printNetworkBufferFillState()

void essentia::scheduler::printNetworkBufferFillState ( )

Prints the fill state of all the buffers in the last created network.

◆ removeNodeIdFromName()

std::string essentia::scheduler::removeNodeIdFromName ( const std::string &  name)
inline

Referenced by getIdentityAndName().

◆ returnAlgorithm()

streaming::Algorithm* essentia::scheduler::returnAlgorithm ( NetworkNode node)
inline

◆ returnIdentity()

NodeType* essentia::scheduler::returnIdentity ( NodeType *  node)