TTK
Loading...
Searching...
No Matches
FTMDataTypes.h
Go to the documentation of this file.
1
14
15#pragma once
16
17#include <DataTypes.h>
18#include <functional>
19#include <limits>
20#include <set>
21#include <tuple>
22
23// untied OpenMP tasks are causing segfaults in MergeTreeClustering when
24// compiled with Clang
25#ifdef __clang__
26#define UNTIED()
27#else
28#define UNTIED() untied
29#endif
30
31namespace ttk {
32 namespace ftm {
33 // Types
34 // --------
35
37 using idSuperArc = long unsigned int;
39 using idNode = unsigned int;
40
42 // Warning, in long long int the max super arc is -1, might not be able to
43 // deal with too large data
44 using idCorresp = long long int;
45
49
52
54 using ufDataType = long int;
55
58
60 using idTask = TaskId;
61
64
65 // For tasks:
66 // Set using scalar value comparison
67 using VertCompFN = std::function<bool(SimplexId, SimplexId)>;
68 using SetPropagation = std::set<SimplexId, VertCompFN>;
70 = std::function<bool(const SetPropagation &, const SetPropagation &)>;
71
72 // Special values for types
73 // --------------------------
74
75 // QUESTION impact on performance using max (0 would be faster alloacted)
76 static const idSuperArc nullSuperArc
77 = std::numeric_limits<idSuperArc>::max();
78 static const idNode nullNodes = std::numeric_limits<idNode>::max();
79 static const SimplexId nullVertex = std::numeric_limits<SimplexId>::max();
80 static const SimplexId nullEdge = std::numeric_limits<SimplexId>::max();
81 static const SimplexId nullCell = std::numeric_limits<SimplexId>::max();
82 static const idCorresp nullCorresp = std::numeric_limits<idCorresp>::max();
83 static const idSegment nullSegment = std::numeric_limits<idSegment>::max();
84 static const ufDataType nullUfData = std::numeric_limits<ufDataType>::max();
85 static constexpr ufDataType specialUfData
86 = std::numeric_limits<ufDataType>::max() - 1;
87 static const idThread nullThread = std::numeric_limits<idThread>::max();
88
89 // Enum data
90 // ----------
91
92 enum TreeType : char { Join = 0, Split = 1, Contour = 2, Join_Split = 3 };
93
94 enum SimplifMethod : char { Persist = 0, Span = 1, NbVert = 2, NbArc = 3 };
95
97
98 enum class TreeComponent {
99 Arc = -1,
101 Saddle1,
102 Saddle2,
104 };
105
106 enum class ArcType : char {
107 Min_arc = 0,
108 Max_arc,
112 };
113 } // namespace ftm
114} // namespace ttk
115
116// Tests
117// Stats time are not compatible with CT, only MT
118// #define withStatsTime 1
119
120// #define withProcessSpeed 1
TaskId idTask
for task identifiers
idSuperArc idSegment
for the segmentation, we have an array of segment containing area of the mesh
long unsigned int idSuperArc
SuperArc index in vect_superArcs_.
long long int idCorresp
type used to recover Node/Arc in vert2tree SIGNED ONLY
std::function< bool(SimplexId, SimplexId)> VertCompFN
ThreadId numThread
type use to store threads related numbers
std::set< SimplexId, VertCompFN > SetPropagation
SimplexId valence
for vertex up/down valence
ThreadId idThread
manage number of threads
long int ufDataType
type stored by UnionFind
unsigned int idNode
Node index in vect_nodes_.
std::function< bool(const SetPropagation &, const SetPropagation &)> SetCompFN
The Topology ToolKit.
int ThreadId
Identifier type for threads (i.e. with OpenMP).
Definition DataTypes.h:26
int SimplexId
Identifier type for simplices of any dimension.
Definition DataTypes.h:22
int TaskId
Identifier type for tasks (i.e. with OpenMP).
Definition DataTypes.h:29