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
HeterogeneousCore
CUDACore
src
chooseDevice.cc
Go to the documentation of this file.
1
#include "
FWCore/ServiceRegistry/interface/Service.h
"
2
#include "
HeterogeneousCore/CUDAServices/interface/CUDAService.h
"
3
4
#include "
chooseDevice.h
"
5
6
namespace
cms::cuda
{
7
int
chooseDevice
(
edm::StreamID
id
) {
8
edm::Service<CUDAService>
cudaService;
9
10
// For startes we "statically" assign the device based on
11
// edm::Stream number. This is suboptimal if the number of
12
// edm::Streams is not a multiple of the number of CUDA devices
13
// (and even then there is no load balancing).
14
//
15
// TODO: improve the "assignment" logic
16
return
id
% cudaService->
numberOfDevices
();
17
}
18
}
// namespace cms::cuda
cms::cuda
Definition:
Product.h:14
edm::StreamID
Definition:
StreamID.h:30
cms::cuda::chooseDevice
int chooseDevice(edm::StreamID id)
Definition:
chooseDevice.cc:7
chooseDevice.h
CUDAService::numberOfDevices
int numberOfDevices() const
Definition:
CUDAService.h:24
Service.h
edm::Service
Definition:
Service.h:30
CUDAService.h
Generated for CMSSW Reference Manual by
1.8.16