iMSTK
Interactive Medical Simulation Toolkit
Source
Common
TaskGraph
imstkSequentialTaskGraphController.cpp
1
/*
2
** This file is part of the Interactive Medical Simulation Toolkit (iMSTK)
3
** iMSTK is distributed under the Apache License, Version 2.0.
4
** See accompanying NOTICE for details.
5
*/
6
7
#include "imstkSequentialTaskGraphController.h"
8
#include "imstkTaskGraph.h"
9
10
namespace
imstk
11
{
12
void
13
SequentialTaskGraphController::init
()
14
{
15
m_executionOrderedNodes =
TaskGraph::topologicalSort
(m_graph);
16
}
17
18
void
19
SequentialTaskGraphController::execute
()
20
{
21
// Sequential
22
for
(std::shared_ptr<TaskNode> node : *m_executionOrderedNodes)
23
{
24
node->execute();
25
}
26
}
27
}
// namespace imstk
imstk
Compound Geometry.
Definition:
OctreeDebugModel.cpp:10
imstk::SequentialTaskGraphController::execute
void execute() override
Executes the TaskGraph.
Definition:
imstkSequentialTaskGraphController.cpp:19
imstk::TaskGraph::topologicalSort
static std::shared_ptr< TaskNodeList > topologicalSort(std::shared_ptr< TaskGraph > graph)
Graph sum, shared references are considered identical nodes, source/sink of results invalidated/nullp...
Definition:
imstkTaskGraph.cpp:415
imstk::SequentialTaskGraphController::init
void init() override
Sorts the computational nodes.
Definition:
imstkSequentialTaskGraphController.cpp:13
Generated by
1.8.13