8 #include <tbb/combinable.h> 9 #include <tbb/enumerable_thread_specific.h> 10 #include <tbb/flow_graph.h> 11 #include <tbb/task_group.h> 14 namespace frechet {
namespace poly {
16 using namespace reach;
41 virtual void calculateReachabilityGraphs()
override;
42 virtual void calculateValidPlacements(
double epsilon)
override;
43 virtual GraphPtr findFeasiblePath()
override;
46 virtual void collectCriticalValues_b(
const Curve& P,
const Curve& Q)
override;
47 virtual void collectCriticalValues_c(
const Curve& P,
const Curve& Q)
override;
48 virtual void collectCriticalValues_d()
override;
49 virtual void combineCriticalValues()
override;
52 bool assertReachabilityGraphs();
100 typedef tbb::enumerable_thread_specific<PolygonShortestPathsFS*>
LocalSPT;
114 virtual void triangulate()
override;
117 virtual void calculateReachabilityGraphs()
override;
118 virtual void calculateValidPlacements(
double epsilon)
override;
123 virtual void collectCriticalValues_b(
const Curve& P,
const Curve& Q)
override;
124 virtual void collectCriticalValues_c(
const Curve& P,
const Curve& Q)
override;
125 virtual void collectCriticalValues_d()
override;
128 virtual void combineCriticalValues()
override;
216 virtual GraphPtr findFeasiblePath()
override;
217 virtual bool isSolution(
GraphPtr G)
override;
232 virtual void cleanup()
override;
236 void barrier(
bool finish);
frechet::reach::Graph::ptr GraphPtr
the result of the decision algorithm is a reachability Graph containing a feasible path
Multi-Core implementaion. Uses Intel TBB to perform some parallel computation.
tbb::combinable< CriticalValueList > LocalCriticalValueList
std::list< Graph::ptr > GraphList
list of tasks, sorted by b-level b-level 0 = leaves = RG's
tbb::enumerable_thread_specific< PolygonShortestPathsFS * > LocalSPT
global definitions for all algorithms.
std::vector< double > CriticalValueList
a list of critical values
Sequential implementation for a single processor core.
TDS::Edge Edge
an edge of the triangulation either an edge of the polygon, or a diagonal, or an articial "outer" edg...
implementation with a sorted call-graph.
base class for algorithm for simple polygons.
GraphList roots
roots of the call graph: this is where the results of the algorithm pop up
static LocalSPT spt
thread-local copies for PolygonShortestPathsFS
std::vector< Segment > c_diagonals_vector
vector of c-diagonals
std::vector< GraphList > TopoSort
QPolygonF Curve
a polygonal curve in the plane; with double floating point precision. This type is heavily used throu...
MatrixPool pool
recycling pool of matrices
boost::shared_ptr< Graph > ptr
memory pool for matrix objects (M4RI matrices mzd_t* and OpenCL matrices clm4rm_t*)
void reclaim(mzd_t *m, MatrixPool *pool)
reclaim an object (i.e. put it into the recycling list)
Represents a Reachability Graph. Vertices correspond to intervals in the reachability structure,...
static LocalTriangulation qtri
thread-local copies of Q->triangulation
tbb::enumerable_thread_specific< Triangulation * > LocalTriangulation
static LocalCriticalValueList localCriticalValues
thread-local copies of critical values
TopoSort topo
sorted call graph