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 // ----------
92 enum TreeType : char { Join = 0, Split = 1, Contour = 2, Join_Split = 3 };
94 enum SimplifMethod : char { Persist = 0, Span = 1, NbVert = 2, NbArc = 3 };
96 enum ComponentState : char { Visible, Hidden, Pruned, Merged };
104 };
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
idSuperArc idSegment
for the segmentation, we have an array of segment containing area of the mesh
ThreadId idThread
manage number of threads
long unsigned int idSuperArc
SuperArc index in vect_superArcs_.
std::set< SimplexId, VertCompFN > SetPropagation
TaskId idTask
for task identifiers
SimplexId valence
for vertex up/down valence
ThreadId numThread
type use to store threads related numbers
std::function< bool(SimplexId, SimplexId)> VertCompFN
long int ufDataType
type stored by UnionFind
std::function< bool(const SetPropagation &, const SetPropagation &)> SetCompFN
long long int idCorresp
type used to recover Node/Arc in vert2tree SIGNED ONLY
unsigned int idNode
Node index in vect_nodes_.
TTK base package defining the standard types.
int SimplexId
Identifier type for simplices of any dimension.
Definition DataTypes.h:22
int ThreadId
Identifier type for threads (i.e. with OpenMP).
Definition DataTypes.h:26
int TaskId
Identifier type for tasks (i.e. with OpenMP).
Definition DataTypes.h:29