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
tensors
contraction_benchmarks_cpu.cc
Go to the documentation of this file.
1
#define EIGEN_USE_THREADS
2
3
#include <string>
4
5
#include "
tensor_benchmarks.h
"
6
7
#define CREATE_THREAD_POOL(threads) \
8
Eigen::ThreadPool pool(threads); \
9
Eigen::ThreadPoolDevice device(&pool, threads);
10
11
12
// Contractions for number of threads ranging from 1 to 32
13
// Dimensions are Rows, Cols, Depth
14
#define BM_ContractionCPU(D1, D2, D3) \
15
static void BM_##Contraction##_##D1##x##D2##x##D3(int iters, int Threads) { \
16
StopBenchmarkTiming(); \
17
CREATE_THREAD_POOL(Threads); \
18
BenchmarkSuite<Eigen::ThreadPoolDevice, float> suite(device, D1, D2, D3); \
19
suite.contraction(iters); \
20
} \
21
BENCHMARK_RANGE(BM_##Contraction##_##D1##x##D2##x##D3, 1, 32);
22
23
24
// Vector Matrix and Matrix Vector products
25
BM_ContractionCPU
(1, 2000, 500);
26
BM_ContractionCPU
(2000, 1, 500);
27
28
// Various skinny matrices
29
BM_ContractionCPU
(250, 3, 512);
30
BM_ContractionCPU
(1500, 3, 512);
31
32
BM_ContractionCPU
(512, 800, 4);
33
BM_ContractionCPU
(512, 80, 800);
34
BM_ContractionCPU
(512, 80, 13522);
35
BM_ContractionCPU
(1, 80, 13522);
36
37
BM_ContractionCPU
(3200, 512, 4);
38
BM_ContractionCPU
(3200, 512, 80);
39
BM_ContractionCPU
(3200, 80, 512);
tensor_benchmarks.h
BM_ContractionCPU
#define BM_ContractionCPU(D1, D2, D3)
Definition:
contraction_benchmarks_cpu.cc:14
gtsam
Author(s):
autogenerated on Fri Mar 28 2025 03:01:17