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
= 0x7FF0000000000000
LL
;
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
ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::pixelStatus::mask
constexpr uint32_t mask
Definition:
PixelClustering.h:35
edm::isNotFinite
constexpr bool isNotFinite(T x)
Definition:
isFinite.h:9
findQualityFiles.v
v
Definition:
findQualityFiles.py:179
L1DTConfigBti_cff.LL
LL
Definition:
L1DTConfigBti_cff.py:25
ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr
if constexpr(n > 3)
Definition:
BrokenLine.h:164
edm::isFinite
constexpr bool isFinite(T x)
ztail.d
d
Definition:
ztail.py:151
geometryCSVtoXML.xx
xx
Definition:
geometryCSVtoXML.py:19
edm
HLT enums.
Definition:
AlignableModifier.h:19
x
float x
Definition:
beamSpotDipStandalone.cc:55
T
long double T
Definition:
Basic3DVectorLD.h:48
MainPageGenerator.l
l
Definition:
MainPageGenerator.py:429
Generated for CMSSW Reference Manual by
1.8.14