IsNaN.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_SHIMS_ISNAN_H_
36 #define _BLAZE_MATH_SHIMS_ISNAN_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/system/Inline.h>
44 #include <blaze/util/EnableIf.h>
46 
47 
48 //*************************************************************************************************
49 // Macro undefinition
50 //*************************************************************************************************
51 
52 #ifdef isnan
53 # undef isnan
54 #endif
55 
56 
57 namespace blaze {
58 
59 //=================================================================================================
60 //
61 // ISNAN SHIM
62 //
63 //=================================================================================================
64 
65 //*************************************************************************************************
78 template< typename T >
79 BLAZE_ALWAYS_INLINE typename EnableIf< IsNumeric<T>, bool >::Type isnan( T a )
80 {
81  return a != a;
82 }
83 //*************************************************************************************************
84 
85 } // namespace blaze
86 
87 #endif
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
bool isnan(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is not a number.
Definition: DiagonalProxy.h:629
Header file for the EnableIf class template.
Header file for the IsNumeric type trait.
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:184
System settings for the inline keywords.