Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace 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
x
y
z
Variables
_
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
Typedefs
_
a
b
c
d
e
f
g
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Enumerations
a
c
d
e
f
g
i
k
l
m
n
p
q
r
s
t
u
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Classes
Class List
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
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
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
f
k
l
m
n
o
p
r
s
t
v
z
Enumerator
_
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
Related Functions
:
a
b
c
d
e
g
h
i
l
m
n
o
p
r
s
t
u
v
Files
File List
File 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
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
x
z
Enumerations
Enumerator
b
c
e
f
g
i
l
m
n
o
p
r
s
t
u
v
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
gtsam
3rdparty
Eigen
bench
basicbenchmark.cpp
Go to the documentation of this file.
1
2
#include <iostream>
3
#include "
BenchUtil.h
"
4
#include "
basicbenchmark.h
"
5
6
int
main
(
int
argc,
char
*argv[])
7
{
8
DISABLE_SSE_EXCEPTIONS
();
9
10
// this is the list of matrix type and size we want to bench:
11
// ((suffix) (matrix size) (number of iterations))
12
#define MODES ((3d)(3)(4000000)) ((4d)(4)(1000000)) ((Xd)(4)(1000000)) ((Xd)(20)(10000))
13
// #define MODES ((Xd)(20)(10000))
14
15
#define _GENERATE_HEADER(R,ARG,EL) << BOOST_PP_STRINGIZE(BOOST_PP_SEQ_HEAD(EL)) << "-" \
16
<< BOOST_PP_STRINGIZE(BOOST_PP_SEQ_ELEM(1,EL)) << "x" \
17
<< BOOST_PP_STRINGIZE(BOOST_PP_SEQ_ELEM(1,EL)) << " / "
18
19
std::cout BOOST_PP_SEQ_FOR_EACH(
_GENERATE_HEADER
, ~,
MODES
) << endl;
20
21
const
int
tries = 10;
22
23
#define _RUN_BENCH(R,ARG,EL) \
24
std::cout << ARG( \
25
BOOST_PP_CAT(Matrix, BOOST_PP_SEQ_HEAD(EL)) (\
26
BOOST_PP_SEQ_ELEM(1,EL),BOOST_PP_SEQ_ELEM(1,EL)), BOOST_PP_SEQ_ELEM(2,EL), tries) \
27
<< " ";
28
29
BOOST_PP_SEQ_FOR_EACH(
_RUN_BENCH
, benchBasic<LazyEval>,
MODES
);
30
std::cout << endl;
31
BOOST_PP_SEQ_FOR_EACH(
_RUN_BENCH
, benchBasic<EarlyEval>,
MODES
);
32
std::cout << endl;
33
34
return
0;
35
}
basicbenchmark.h
BenchUtil.h
DISABLE_SSE_EXCEPTIONS
#define DISABLE_SSE_EXCEPTIONS()
Definition:
BenchUtil.h:34
MODES
#define MODES
_GENERATE_HEADER
#define _GENERATE_HEADER(R, ARG, EL)
_RUN_BENCH
#define _RUN_BENCH(R, ARG, EL)
main
int main(int argc, char *argv[])
Definition:
basicbenchmark.cpp:6
gtsam
Author(s):
autogenerated on Wed Mar 19 2025 03:01:18