Main Page
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
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
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
q
r
s
t
u
v
w
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
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
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
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
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
Properties
_
a
d
e
f
l
m
o
p
s
t
u
v
Related 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
Package Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
FWCore
Concurrency
src
setNThreads.cc
Go to the documentation of this file.
1
//
2
// setNThreads.cc
3
// CMSSW
4
//
5
// Created by Chris Jones on 7/24/20.
6
//
7
#include "tbb/task_arena.h"
8
#include "
FWCore/Concurrency/interface/setNThreads.h
"
9
10
namespace
edm
{
11
unsigned
int
setNThreads
(
unsigned
int
iNThreads,
unsigned
int
iStackSize, std::unique_ptr<ThreadsController>& oPtr) {
12
//stack size is given in KB but passed in as bytes
13
iStackSize *= 1024;
14
15
oPtr.reset();
16
if
(0 == iNThreads) {
17
//Allow TBB to decide how many threads. This is normally the number of CPUs in the machine.
18
iNThreads = tbb::this_task_arena::max_concurrency();
19
}
20
oPtr = std::make_unique<ThreadsController>(static_cast<int>(iNThreads), iStackSize);
21
22
return
iNThreads;
23
}
24
}
// namespace edm
edm
HLT enums.
Definition:
AlignableModifier.h:19
setNThreads.h
edm::setNThreads
unsigned int setNThreads(unsigned int iNThreads, unsigned int iStackSize, std::unique_ptr< ThreadsController > &oPtr)
Definition:
setNThreads.cc:11
Generated for CMSSW Reference Manual by
1.8.16