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
unsupported
Eigen
CXX11
src
ThreadPool
ThreadEnvironment.h
Go to the documentation of this file.
1
// This file is part of Eigen, a lightweight C++ template library
2
// for linear algebra.
3
//
4
// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>
5
//
6
// This Source Code Form is subject to the terms of the Mozilla
7
// Public License v. 2.0. If a copy of the MPL was not distributed
8
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9
10
#ifndef EIGEN_CXX11_THREADPOOL_THREAD_ENVIRONMENT_H
11
#define EIGEN_CXX11_THREADPOOL_THREAD_ENVIRONMENT_H
12
13
namespace
Eigen
{
14
15
struct
StlThreadEnvironment
{
16
struct
Task
{
17
std::function<void()>
f
;
18
};
19
20
// EnvThread constructor must start the thread,
21
// destructor must join the thread.
22
class
EnvThread
{
23
public
:
24
EnvThread
(std::function<
void
()>
f
) :
thr_
(
std
::
move
(
f
)) {}
25
~EnvThread
() {
thr_
.join(); }
26
// This function is called when the threadpool is cancelled.
27
void
OnCancel
() { }
28
29
private
:
30
std::thread
thr_
;
31
};
32
33
EnvThread
*
CreateThread
(std::function<
void
()>
f
) {
return
new
EnvThread
(std::move(
f
)); }
34
Task
CreateTask
(std::function<
void
()>
f
) {
return
Task
{std::move(
f
)}; }
35
void
ExecuteTask
(
const
Task
&
t
) {
t
.f(); }
36
};
37
38
}
// namespace Eigen
39
40
#endif // EIGEN_CXX11_THREADPOOL_THREAD_ENVIRONMENT_H
Eigen
Namespace containing all symbols from the Eigen library.
Definition:
jet.h:637
Eigen::StlThreadEnvironment::EnvThread::EnvThread
EnvThread(std::function< void()> f)
Definition:
ThreadEnvironment.h:24
Eigen::StlThreadEnvironment::ExecuteTask
void ExecuteTask(const Task &t)
Definition:
ThreadEnvironment.h:35
Eigen::StlThreadEnvironment
Definition:
ThreadEnvironment.h:15
Eigen::StlThreadEnvironment::EnvThread::OnCancel
void OnCancel()
Definition:
ThreadEnvironment.h:27
Eigen::StlThreadEnvironment::EnvThread
Definition:
ThreadEnvironment.h:22
Eigen::StlThreadEnvironment::Task::f
std::function< void()> f
Definition:
ThreadEnvironment.h:17
Eigen::StlThreadEnvironment::EnvThread::~EnvThread
~EnvThread()
Definition:
ThreadEnvironment.h:25
Eigen::StlThreadEnvironment::Task
Definition:
ThreadEnvironment.h:16
Eigen::StlThreadEnvironment::EnvThread::thr_
std::thread thr_
Definition:
ThreadEnvironment.h:30
tree::f
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
Definition:
testExpression.cpp:218
move
detail::enable_if_t<!detail::move_never< T >::value, T > move(object &&obj)
Definition:
cast.h:1250
std
Definition:
BFloat16.h:88
align_3::t
Point2 t(10, 10)
Eigen::StlThreadEnvironment::CreateTask
Task CreateTask(std::function< void()> f)
Definition:
ThreadEnvironment.h:34
Eigen::StlThreadEnvironment::CreateThread
EnvThread * CreateThread(std::function< void()> f)
Definition:
ThreadEnvironment.h:33
gtsam
Author(s):
autogenerated on Fri Mar 28 2025 03:08:26