TTK
Toggle main menu visibility
Main Page
Topics
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
y
z
Functions
a
c
d
f
g
i
l
m
o
p
r
s
t
u
v
z
Variables
b
c
d
e
f
g
i
l
m
o
p
r
s
u
v
w
y
Typedefs
b
c
d
e
g
i
l
m
n
o
p
r
s
t
u
v
Enumerations
Enumerator
a
b
c
f
g
h
j
l
m
n
o
p
s
v
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
c
e
g
i
k
n
p
q
r
s
t
v
w
Enumerations
b
c
d
e
f
m
p
r
s
t
v
Related Symbols
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Functions
a
b
c
d
e
f
g
h
i
j
m
n
p
r
s
t
v
w
Variables
Typedefs
Enumerations
Enumerator
Macros
b
c
d
e
f
g
h
i
m
o
p
r
s
t
u
v
w
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
core
base
common
BaseClass.cpp
Go to the documentation of this file.
1
#include <
BaseClass.h
>
2
3
#ifdef TTK_ENABLE_OPENMP
4
COMMON_EXPORTS
int
ttk::globalThreadNumber_
= omp_get_max_threads();
5
#else
6
COMMON_EXPORTS
int
ttk::globalThreadNumber_
= 1;
7
#endif
8
9
COMMON_EXPORTS
int
ttk::MPIrank_
= -1;
10
COMMON_EXPORTS
int
ttk::MPIsize_
= -1;
11
#ifdef TTK_ENABLE_MPI
12
COMMON_EXPORTS
MPI_Comm ttk::MPIcomm_;
13
#endif
14
15
using namespace
ttk
;
16
17
BaseClass::BaseClass
() : lastObject_{false}, wrapper_{nullptr} {
18
threadNumber_
=
ttk::globalThreadNumber_
;
19
20
#ifdef TTK_ENABLE_MPI
21
if
(
ttk::MPIrank_
== -1) {
22
int
flag;
23
MPI_Initialized(&flag);
24
if
(flag) {
25
MPI_Comm_rank(MPI_COMM_WORLD, &
ttk::MPIrank_
);
26
MPI_Comm_size(MPI_COMM_WORLD, &
ttk::MPIsize_
);
27
MPI_Comm_dup(MPI_COMM_WORLD, &ttk::MPIcomm_);
28
}
else
{
29
ttk::MPIrank_
= 0;
30
ttk::MPIsize_
= 0;
31
}
32
}
33
#endif
// TTK_ENABLE_MPI
34
}
17
BaseClass::BaseClass
() : lastObject_{false}, wrapper_{nullptr} {
…
}
35
36
int
BaseClass::setWrapper
(
const
Wrapper
*wrapper) {
37
wrapper_
=
const_cast<
Wrapper
*
>
(wrapper);
38
39
// dynamic_cast is impossible because the Wrapper class is incomplete
40
setThreadNumber
(
reinterpret_cast<
BaseClass
*
>
(
wrapper_
)->
threadNumber_
);
41
return
0;
42
}
36
int
BaseClass::setWrapper
(
const
Wrapper
*wrapper) {
…
}
BaseClass.h
COMMON_EXPORTS
#define COMMON_EXPORTS
Definition
BaseClass.h:31
ttk::BaseClass
TTK base package.
Definition
BaseClass.h:70
ttk::BaseClass::setWrapper
virtual int setWrapper(const Wrapper *wrapper)
Definition
BaseClass.cpp:36
ttk::BaseClass::threadNumber_
int threadNumber_
Definition
BaseClass.h:95
ttk::BaseClass::BaseClass
BaseClass()
Definition
BaseClass.cpp:17
ttk::BaseClass::setThreadNumber
virtual int setThreadNumber(const int threadNumber)
Definition
BaseClass.h:80
ttk::BaseClass::wrapper_
Wrapper * wrapper_
Definition
BaseClass.h:96
ttk::Wrapper
Wrapper class to wrap ttk code.
Definition
Wrapper.h:14
ttk
The Topology ToolKit.
Definition
AbstractTriangulation.h:51
ttk::MPIsize_
COMMON_EXPORTS int MPIsize_
Definition
BaseClass.cpp:10
ttk::globalThreadNumber_
COMMON_EXPORTS int globalThreadNumber_
Definition
BaseClass.cpp:6
ttk::MPIrank_
COMMON_EXPORTS int MPIrank_
Definition
BaseClass.cpp:9
Generated on Thu Sep 26 2024 06:50:17 for TTK by
1.9.8