CMS 3D CMS Logo

List of all members | Static Public Member Functions
cond::serialization::access< T, typename std::enable_if< std::is_floating_point< T >::value >::type > Struct Template Reference

#include <Equal.h>

Static Public Member Functions

static bool equal_ (const T first, const T second)
 

Detailed Description

template<typename T>
struct cond::serialization::access< T, typename std::enable_if< std::is_floating_point< T >::value >::type >

Definition at line 59 of file Equal.h.

Member Function Documentation

template<typename T >
static bool cond::serialization::access< T, typename std::enable_if< std::is_floating_point< T >::value >::type >::equal_ ( const T  first,
const T  second 
)
inlinestatic

Definition at line 61 of file Equal.h.

References edm::detail::isnan(), or, and edm::second().

62  {
63  // TODO: we consider all NaNs to be equal -- should we even allow to serialize them?
65  return std::isnan(first) and std::isnan(second);
66 
67  if (std::isinf(first) or std::isinf(second))
68  return std::isinf(first) and std::isinf(second) and std::signbit(first) == std::signbit(second);
69 
70  // TODO: consider expected precision for cross-platform serialization
71  return first == second;
72  }
return((rh^lh)&mask)
U second(std::pair< T, U > const &p)
bool isnan(float x)
Definition: math.h:13
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12