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
CUDAUtilities
src
requireDevices.cc
Go to the documentation of this file.
1
#include <cstdlib>
2
#include <iostream>
3
4
#include <cuda_runtime.h>
5
6
#include "
HeterogeneousCore/CUDAUtilities/interface/requireDevices.h
"
7
8
namespace
cms::cudatest
{
9
bool
testDevices
() {
10
int
devices = 0;
11
auto
status
= cudaGetDeviceCount(&devices);
12
if
(
status
!= cudaSuccess) {
13
std::cerr
<<
"Failed to initialise the CUDA runtime, the test will be skipped."
14
<<
"\n"
;
15
return
false
;
16
}
17
if
(devices == 0) {
18
std::cerr
<<
"No CUDA devices available, the test will be skipped."
19
<<
"\n"
;
20
return
false
;
21
}
22
return
true
;
23
}
24
25
void
requireDevices
() {
26
if
(not
testDevices
()) {
27
exit
(EXIT_SUCCESS);
28
}
29
}
30
}
// namespace cms::cudatest
mps_update.status
status
Definition:
mps_update.py:69
cms::cudatest::requireDevices
void requireDevices()
Print message and exit if there are no CUDA devices.
Definition:
requireDevices.cc:25
requireDevices.h
cms::cudatest
Definition:
ScopedContext.h:18
cms::cudatest::testDevices
bool testDevices()
In presence of CUDA devices, return true; otherwise print message and return false.
Definition:
requireDevices.cc:9
beam_dqm_sourceclient-live_cfg.cerr
cerr
Definition:
beam_dqm_sourceclient-live_cfg.py:17
beamvalidation.exit
def exit(msg="")
Definition:
beamvalidation.py:53
Generated for CMSSW Reference Manual by
1.8.16