CMS 3D CMS Logo

cms_common_macros.h
Go to the documentation of this file.
1 #ifndef RecoTracker_MkFitCore_interface_cms_common_macros_h
2 #define RecoTracker_MkFitCore_interface_cms_common_macros_h
3 
4 #ifdef MKFIT_STANDALONE
5 #define CMS_SA_ALLOW
6 #else
9 #endif
10 
11 namespace mkfit {
12 
13  constexpr bool isFinite(float x) {
14 #ifdef MKFIT_STANDALONE
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 #else
22  return edm::isFinite(x);
23 #endif
24  }
25 
26 } // namespace mkfit
27 
28 #endif
constexpr bool isFinite(T x)
d
Definition: ztail.py:151
float x
constexpr bool isFinite(float x)