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 | ||
) |
Definition at line 27 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 38 of file ProcessGraph.cpp.
void tuttle::host::graph::ProcessGraph::bakeGraphInformationToNodes | ( | InternalGraphAtTimeImpl & | renderGraphAtTime | ) | [private] |
Definition at line 150 of file ProcessGraph.cpp.
References tuttle::host::graph::ProcessVertexAtTimeData::_inDegree, tuttle::host::graph::ProcessVertexAtTimeData::_inEdges, tuttle::host::graph::ProcessVertexAtTimeData::_isFinalNode, 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::host::graph::IVertex::isFake(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::sourceInstance(), TUTTLE_INFO, and TUTTLE_TLOG.
Referenced by setupAtTime().
void tuttle::host::graph::ProcessGraph::beginSequence | ( | const TimeRange & | timeRange | ) |
Definition at line 187 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(), OfxRangeD::max, OfxRangeD::min, TUTTLE_INFO, and TUTTLE_TLOG.
Referenced by process().
void tuttle::host::graph::ProcessGraph::computeHashAtTime | ( | NodeHashContainer & | outNodesHash, |
const OfxTime | time | ||
) |
Definition at line 526 of file ProcessGraph.cpp.
References _renderGraphAtTime, tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::depthFirstVisit(), getOutputVertexAtTime(), setupAtTime(), TUTTLE_INFO, and TUTTLE_TLOG.
Referenced by tuttle::host::Graph::computeGlobalHashAtTime().
std::list< TimeRange > tuttle::host::graph::ProcessGraph::computeTimeRange | ( | ) |
Definition at line 304 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(), kOfxFlagInfiniteMax, kOfxFlagInfiniteMin, tuttle::max(), OfxRangeD::max, tuttle::min(), OfxRangeD::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 205 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 42 of file ProcessGraph.cpp.
References _outputId, 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 46 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::MemoryCache & | outCache | ) |
Definition at line 587 of file ProcessGraph.cpp.
References tuttle::host::TimeRange::_begin, tuttle::host::TimeRange::_end, _options, _renderGraph, tuttle::host::TimeRange::_step, beginSequence(), tuttle::host::memory::IMemoryCache::clearUnused(), computeTimeRange(), tuttle::host::core(), endSequence(), tuttle::host::graph::exportAsDOT(), tuttle::host::graph::exportDebugAsDOT(), tuttle::host::ComputeOptions::getAbort(), tuttle::host::ComputeOptions::getContinueOnError(), tuttle::host::ComputeOptions::getContinueOnMissingFile(), tuttle::host::Core::getMemoryCache(), processAtTime(), setup(), setupAtTime(), TUTTLE_ERROR, TUTTLE_INFO, TUTTLE_LOG_ERROR, TUTTLE_LOG_WARNING, TUTTLE_TLOG, and TUTTLE_TLOG_INFOS.
Referenced by tuttle::host::Graph::compute().
void tuttle::host::graph::ProcessGraph::processAtTime | ( | memory::MemoryCache & | outCache, |
const OfxTime | time | ||
) |
Definition at line 539 of file ProcessGraph.cpp.
References _options, _outputId, _renderGraph, _renderGraphAtTime, tuttle::host::INode::clearProcessDataAtTime(), tuttle::host::memory::IMemoryCache::clearUnused(), tuttle::host::core(), tuttle::host::graph::InternalGraph< VERTEX, EDGE, OutEdgeList, VertexList, EdgeList >::depthFirstVisit(), tuttle::common::Color::get(), tuttle::host::Core::getMemoryCache(), 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_INFO, and TUTTLE_TLOG.
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 54 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 246 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 process(), tuttle::host::Graph::setup(), and tuttle::host::OverlayInteract::setupGraph().
void tuttle::host::graph::ProcessGraph::setupAtTime | ( | const OfxTime | time | ) |
Definition at line 341 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_TLOG, and TUTTLE_TLOG_INFOS.
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 216 of file ProcessGraph.cpp.
References _outputId, _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 80 of file ProcessGraph.hpp.
Definition at line 79 of file ProcessGraph.hpp.
Referenced by beginSequence(), endSequence(), and relink().
const ComputeOptions& tuttle::host::graph::ProcessGraph::_options [private] |
Definition at line 84 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 82 of file ProcessGraph.hpp.
Referenced by computeTimeRange(), getOutputKeyAtTime(), processAtTime(), relink(), setup(), setupAtTime(), and updateGraph().
Definition at line 85 of file ProcessGraph.hpp.
Referenced by beginSequence(), endSequence(), ProcessGraph(), and setup().
Definition at line 77 of file ProcessGraph.hpp.
Referenced by computeTimeRange(), process(), processAtTime(), relink(), setup(), setupAtTime(), and updateGraph().
Definition at line 78 of file ProcessGraph.hpp.
Referenced by bakeGraphInformationToNodes(), computeHashAtTime(), getOutputVertexAtTime(), processAtTime(), and setupAtTime().