TuttleOFX
1
|
Created from a user Graph, this class allows you to launch the process. More...
#include <ProcessGraph.hpp>
Created from a user Graph, this class allows you to launch the process.
Internally this class use multiple graphs with different representation of the graph. It create a new graph with a vertex for each node at each time. It reorder the nodes to optimise memory usage.
Definition at line 33 of file ProcessGraph.hpp.
Definition at line 41 of file ProcessGraph.hpp.
Definition at line 39 of file ProcessGraph.hpp.
Definition at line 40 of file ProcessGraph.hpp.
Definition at line 49 of file ProcessGraph.hpp.
typedef InternalGraph<ProcessVertexAtTime, ProcessEdgeAtTime> tuttle::host::graph::ProcessGraph::InternalGraphAtTimeImpl |
Definition at line 43 of file ProcessGraph.hpp.
Definition at line 42 of file ProcessGraph.hpp.
Definition at line 36 of file ProcessGraph.hpp.
typedef std::map<std::string, Node*> tuttle::host::graph::ProcessGraph::NodeMap |
Definition at line 45 of file ProcessGraph.hpp.
Definition at line 37 of file ProcessGraph.hpp.
Definition at line 38 of file ProcessGraph.hpp.
tuttle::host::graph::ProcessGraph::ProcessGraph | ( | const ComputeOptions & | options, |
Graph & | graph, | ||
const std::list< std::string > & | nodes, | ||
memory::IMemoryCache & | internMemoryCache | ||
) |
Definition at line 18 of file ProcessGraph.cpp.
References tuttle::host::graph::ProcessVertexData::_interactive, _options, _procOptions, tuttle::host::graph::ProcessVertexData::_renderScale, tuttle::host::ComputeOptions::getIsInteractive(), tuttle::host::ComputeOptions::getRenderScale(), and updateGraph().
tuttle::host::graph::ProcessGraph::~ProcessGraph | ( | ) |
@ todo: const Graph, no ?
Definition at line 31 of file ProcessGraph.cpp.
void tuttle::host::graph::ProcessGraph::bakeGraphInformationToNodes | ( | InternalGraphAtTimeImpl & | renderGraphAtTime | ) | [private] |
Definition at line 144 of file ProcessGraph.cpp.
References tuttle::host::graph::ProcessVertexAtTimeData::_inDegree, tuttle::host::graph::ProcessVertexAtTimeData::_inEdges, tuttle::host::graph::ProcessVertexAtTimeData::_outDegree, tuttle::host::graph::ProcessVertexAtTimeData::_outEdges, _renderGraphAtTime, tuttle::host::graph::IEdge::getInAttrName(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::getInDegree(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::getInEdges(), tuttle::host::graph::ProcessEdgeAtTime::getInTime(), tuttle::host::graph::IVertex::getName(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::getOutDegree(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::getOutEdges(), tuttle::host::graph::ProcessVertexAtTime::getProcessDataAtTime(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::getVertices(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::instance(), TUTTLE_INFO, and TUTTLE_TLOG.
Referenced by setupAtTime().
void tuttle::host::graph::ProcessGraph::beginSequence | ( | const TimeRange & | timeRange | ) |
Definition at line 179 of file ProcessGraph.cpp.
References tuttle::host::TimeRange::_begin, tuttle::host::TimeRange::_end, _nodes, _options, _procOptions, tuttle::host::graph::ProcessVertexData::_renderTimeRange, tuttle::host::TimeRange::_step, tuttle::host::graph::ProcessVertexData::_step, tuttle::host::ComputeOptions::beginSequenceHandle(), TUTTLE_INFO, and TUTTLE_TLOG.
Referenced by process().
void tuttle::host::graph::ProcessGraph::computeHashAtTime | ( | NodeHashContainer & | outNodesHash, |
const OfxTime | time | ||
) |
Definition at line 516 of file ProcessGraph.cpp.
References _renderGraphAtTime, tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::depthFirstVisit(), getOutputVertexAtTime(), setupAtTime(), TUTTLE_INFO, and TUTTLE_TLOG.
std::list< TimeRange > tuttle::host::graph::ProcessGraph::computeTimeRange | ( | ) |
Definition at line 296 of file ProcessGraph.cpp.
References _options, _outputId, _renderGraph, tuttle::host::graph::ProcessVertexData::_timeDomain, tuttle::host::ComputeOptions::getBegin(), tuttle::host::ComputeOptions::getEnd(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::getGraph(), tuttle::host::graph::IVertex::getName(), tuttle::host::graph::ProcessVertex::getProcessData(), tuttle::host::ComputeOptions::getTimeRanges(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::getVertexDescriptor(), tuttle::max(), tuttle::min(), tuttle::quotes(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::targetInstance(), TUTTLE_INFO, TUTTLE_TLOG, TUTTLE_TLOG_INFOS, TUTTLE_TLOG_VAR2, and TUTTLE_TRACE.
Referenced by process().
void tuttle::host::graph::ProcessGraph::endSequence | ( | ) |
Definition at line 197 of file ProcessGraph.cpp.
References _nodes, _options, _procOptions, tuttle::host::ComputeOptions::endSequenceHandle(), TUTTLE_INFO, and TUTTLE_TLOG.
Referenced by process().
ProcessGraph::VertexAtTime::Key tuttle::host::graph::ProcessGraph::getOutputKeyAtTime | ( | const OfxTime | time | ) | [private] |
Definition at line 35 of file ProcessGraph.cpp.
References _outputId, _procOptions, and tuttle::host::graph::ProcessVertexAtTime::getKey().
Referenced by getOutputVertexAtTime().
ProcessGraph::InternalGraphAtTimeImpl::vertex_descriptor tuttle::host::graph::ProcessGraph::getOutputVertexAtTime | ( | const OfxTime | time | ) | [private] |
Definition at line 40 of file ProcessGraph.cpp.
References _renderGraphAtTime, getOutputKeyAtTime(), and tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::getVertexDescriptor().
Referenced by computeHashAtTime(), processAtTime(), and setupAtTime().
bool tuttle::host::graph::ProcessGraph::process | ( | memory::IMemoryCache & | outCache | ) |
Definition at line 578 of file ProcessGraph.cpp.
References tuttle::host::TimeRange::_begin, tuttle::host::TimeRange::_end, _internMemoryCache, _options, _renderGraph, _renderGraphAtTime, tuttle::host::TimeRange::_step, tuttle::host::ComputeOptions::beginFrameHandle(), beginSequence(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::clear(), tuttle::host::memory::IMemoryCache::clearUnused(), computeTimeRange(), tuttle::host::ComputeOptions::endFrameHandle(), endSequence(), tuttle::host::graph::exportAsDOT(), tuttle::host::graph::exportDebugAsDOT(), tuttle::exception::format_current_exception(), tuttle::exception::format_exception_info(), tuttle::exception::format_exception_message(), tuttle::host::ComputeOptions::getAbort(), tuttle::host::ComputeOptions::getContinueOnError(), tuttle::host::ComputeOptions::getContinueOnMissingFile(), processAtTime(), setup(), setupAtTime(), TUTTLE_LOG_ERROR, TUTTLE_LOG_INFO, TUTTLE_LOG_TRACE, and TUTTLE_LOG_WARNING.
Referenced by tuttle::host::Graph::compute().
void tuttle::host::graph::ProcessGraph::processAtTime | ( | memory::IMemoryCache & | outCache, |
const OfxTime | time | ||
) |
Definition at line 529 of file ProcessGraph.cpp.
References _internMemoryCache, _options, _outputId, _renderGraph, _renderGraphAtTime, tuttle::host::INode::clearProcessDataAtTime(), tuttle::host::memory::IMemoryCache::clearUnused(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::depthFirstVisit(), tuttle::host::graph::IVertex::getName(), getOutputVertexAtTime(), tuttle::host::graph::IVertex::getProcessNode(), tuttle::host::ComputeOptions::getReturnBuffers(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::getVertex(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::getVertices(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::instance(), tuttle::host::graph::IVertex::isFake(), tuttle::host::ComputeOptions::processAtTimeHandle(), tuttle::host::graph::visitor::Process< TGraph >::setOutputMemoryCache(), tuttle::host::memory::IMemoryCache::size(), and TUTTLE_LOG_TRACE.
Referenced by process().
void tuttle::host::graph::ProcessGraph::relink | ( | ) | [private] |
After copying Vertices, we need to duplicate Nodes and relink Vertices with new Nodes.
Definition at line 48 of file ProcessGraph.cpp.
References _nodes, _outputId, _renderGraph, tuttle::host::INode::clone(), tuttle::host::INode::getName(), tuttle::host::graph::IVertex::getProcessNode(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::getVertexDescriptor(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::getVertices(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::instance(), tuttle::host::graph::IVertex::isFake(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::removeUnconnectedVertices(), and tuttle::host::graph::IVertex::setProcessNode().
Referenced by updateGraph().
void tuttle::host::graph::ProcessGraph::setup | ( | ) |
Definition at line 238 of file ProcessGraph.cpp.
References tuttle::host::graph::ProcessVertex::_data, _outputId, _procOptions, _renderGraph, tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::depthFirstVisit(), tuttle::host::graph::IVertex::getProcessNode(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::getVertexDescriptor(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::getVertices(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::instance(), tuttle::host::graph::IVertex::isFake(), tuttle::host::graph::ProcessVertex::setProcessData(), tuttle::host::INode::setProcessData(), TUTTLE_INFO, and TUTTLE_TLOG.
Referenced by tuttle::host::Graph::computeGlobalHashAtTime(), process(), tuttle::host::Graph::setup(), and tuttle::host::OverlayInteract::setupGraph().
void tuttle::host::graph::ProcessGraph::setupAtTime | ( | const OfxTime | time | ) |
Definition at line 333 of file ProcessGraph.cpp.
References tuttle::host::graph::ProcessVertex::_data, tuttle::host::graph::ProcessVertexAtTime::_data, tuttle::host::graph::ProcessVertexAtTimeData::_isFinalNode, _options, _outputId, _renderGraph, _renderGraphAtTime, tuttle::host::graph::ProcessVertexData::_times, tuttle::host::graph::ProcessEdge::_timesNeeded, tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::addEdge(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::addVertex(), bakeGraphInformationToNodes(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::clear(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::depthFirstVisit(), tuttle::host::graph::exportDebugAsDOT(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::getEdges(), tuttle::host::ComputeOptions::getForceIdentityNodesProcess(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::getGraph(), tuttle::host::graph::IEdge::getInAttrName(), tuttle::host::graph::ProcessVertexAtTime::getKey(), getOutputVertexAtTime(), tuttle::host::graph::ProcessVertexAtTime::getProcessDataAtTime(), tuttle::host::graph::IVertex::getProcessNode(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::getVertexDescriptor(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::getVertices(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::instance(), tuttle::host::graph::IVertex::isFake(), tuttle::host::graph::visitor::removeIdentityNodes(), tuttle::host::INode::setProcessDataAtTime(), tuttle::host::ComputeOptions::setupAtTimeHandle(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::sourceInstance(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::targetInstance(), TUTTLE_INFO, TUTTLE_LOG_TRACE, and TUTTLE_TLOG.
Referenced by computeHashAtTime(), process(), tuttle::host::Graph::setupAtTime(), and tuttle::host::OverlayInteract::setupGraph().
void tuttle::host::graph::ProcessGraph::updateGraph | ( | Graph & | userGraph, |
const std::list< std::string > & | outputNodes | ||
) |
Definition at line 208 of file ProcessGraph.cpp.
References _outputId, _procOptions, _renderGraph, tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::addVertex(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::connect(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::copyTransposed(), tuttle::host::Graph::getGraph(), tuttle::host::graph::ProcessVertex::getKey(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::instance(), relink(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::rootVertices(), TUTTLE_INFO, and TUTTLE_LOG_DEBUG.
Referenced by ProcessGraph().
Definition at line 81 of file ProcessGraph.hpp.
Definition at line 86 of file ProcessGraph.hpp.
Referenced by process(), and processAtTime().
Definition at line 80 of file ProcessGraph.hpp.
Referenced by beginSequence(), endSequence(), and relink().
const ComputeOptions& tuttle::host::graph::ProcessGraph::_options [private] |
Definition at line 85 of file ProcessGraph.hpp.
Referenced by beginSequence(), computeTimeRange(), endSequence(), process(), processAtTime(), ProcessGraph(), and setupAtTime().
const std::string tuttle::host::graph::ProcessGraph::_outputId [static, private] |
Definition at line 83 of file ProcessGraph.hpp.
Referenced by computeTimeRange(), getOutputKeyAtTime(), processAtTime(), relink(), setup(), setupAtTime(), and updateGraph().
Definition at line 87 of file ProcessGraph.hpp.
Referenced by beginSequence(), endSequence(), getOutputKeyAtTime(), ProcessGraph(), setup(), and updateGraph().
Definition at line 78 of file ProcessGraph.hpp.
Referenced by computeTimeRange(), process(), processAtTime(), relink(), setup(), setupAtTime(), and updateGraph().
Definition at line 79 of file ProcessGraph.hpp.
Referenced by bakeGraphInformationToNodes(), computeHashAtTime(), getOutputVertexAtTime(), process(), processAtTime(), and setupAtTime().