Loading [MathJax]/extensions/TeX/AMSsymbols.js
DGtal
1.4.2
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
x
Variables
a
d
e
f
h
i
l
n
o
p
t
w
x
Typedefs
a
b
c
d
e
i
k
l
n
o
p
r
s
u
v
z
Enumerations
Enumerator
a
b
c
d
e
g
h
i
j
l
m
n
o
p
s
t
u
v
w
z
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
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
x
y
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
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
c
e
f
h
i
l
m
n
o
p
r
s
t
u
Enumerator
a
b
c
d
e
f
g
l
m
o
p
r
s
t
u
v
x
y
z
Related Symbols
a
b
c
d
e
f
g
i
k
l
m
o
p
s
t
u
Examples
►
DGtal
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
testOpenMP.cpp
Go to the documentation of this file.
1
31
#include <iostream>
32
#include "DGtal/base/Common.h"
34
35
using namespace
std
;
36
using namespace
DGtal
;
37
39
// Functions for testing class OpenMP.
41
45
bool
testOpenMP
()
46
{
47
trace
.
beginBlock
(
"Testing basic OpenMP ..."
);
48
49
#ifdef WITH_OPENMP
50
trace
.
info
() <<
"Parallel helloworld"
<<std::endl;
51
#pragma omp parallel
52
trace
.
info
()<<
"Hello, world.\n"
;
53
#else
54
trace
.
info
() <<
"no parallel helloworld"
<<std::endl;
55
#endif
56
57
trace
.
endBlock
();
58
59
return
true
;
60
}
45
bool
testOpenMP
() {
…
}
61
63
// Standard services - public :
64
65
int
main
(
int
argc,
char
** argv )
66
{
67
trace
.
beginBlock
(
"Testing class OpenMP"
);
68
trace
.
info
() <<
"Args:"
;
69
for
(
int
i = 0; i < argc; ++i )
70
trace
.
info
() <<
" "
<< argv[ i ];
71
trace
.
info
() << endl;
72
73
bool
res =
testOpenMP
();
// && ... other tests
74
trace
.
emphase
() << ( res ?
"Passed."
:
"Error."
) << endl;
75
trace
.
endBlock
();
76
return
res ? 0 : 1;
77
}
65
int
main
(
int
argc,
char
** argv ) {
…
}
78
// //
DGtal::Trace::beginBlock
void beginBlock(const std::string &keyword="")
DGtal::Trace::emphase
std::ostream & emphase()
DGtal::Trace::info
std::ostream & info()
DGtal::Trace::endBlock
double endBlock()
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::trace
Trace trace
Definition
Common.h:153
std
STL namespace.
main
int main()
Definition
testBits.cpp:56
testOpenMP
bool testOpenMP()
Definition
testOpenMP.cpp:45
tests
base
testOpenMP.cpp
Generated on Mon Dec 23 2024 11:13:39 for DGtal by
1.12.0