Main Page
Namespaces
Classes
Package Documentation
src
FWCore
Utilities
interface
isFinite.h
Go to the documentation of this file.
1
#ifndef FWCORE_Utilities_isFinite_H
2
#define FWCORE_Utilities_isFinite_H
3
4
namespace
edm
{
5
template
<
typename
T>
6
constexpr
bool
isFinite
(
T
x);
7
8
template
<
typename
T>
9
constexpr
bool
isNotFinite
(
T
x) {
10
return
!
isFinite
(x);
11
}
12
13
template
<>
14
constexpr
bool
isFinite
(
float
x) {
15
const
unsigned
int
mask
= 0x7f800000;
16
union
{
17
unsigned
int
l
;
18
float
d
;
19
}
v
= {.d = x};
20
return
(
v
.l & mask) !=
mask
;
21
}
22
23
template
<>
24
constexpr
bool
isFinite
(
double
x) {
25
const
unsigned
long
long
mask
= 0x7FF0000000000000LL;
26
union
{
27
unsigned
long
long
l
;
28
double
d
;
29
}
v
= {.d = x};
30
return
(
v
.l & mask) !=
mask
;
31
}
32
33
template
<>
34
constexpr
bool
isFinite
(
long
double
x) {
35
double
xx
= x;
36
return
isFinite
(xx);
37
}
38
39
}
// namespace edm
40
41
#endif // FWCORE_Utilities_isFinite_H
edm::isNotFinite
constexpr bool isNotFinite(T x)
Definition:
isFinite.h:9
findQualityFiles.v
v
Definition:
findQualityFiles.py:179
edm::isFinite
constexpr bool isFinite(T x)
RecoTauDiscriminantConfiguration.mask
mask
Definition:
RecoTauDiscriminantConfiguration.py:73
edmIntegrityCheck.d
d
Definition:
edmIntegrityCheck.py:66
geometryCSVtoXML.xx
xx
Definition:
geometryCSVtoXML.py:19
edm
HLT enums.
Definition:
AlignableModifier.h:17
checklumidiff.l
l
Definition:
checklumidiff.py:65
T
long double T
Definition:
Basic3DVectorLD.h:66
constexpr
#define constexpr
Definition:
GCC11Compatibility.h:35
Generated for CMSSW Reference Manual by
1.8.11