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/util/EnableIf.h>
45 
46 
47 //*************************************************************************************************
48 // Macro undefinition
49 //*************************************************************************************************
50 
51 #ifdef isnan
52 # undef isnan
53 #endif
54 
55 
56 namespace blaze {
57 
58 //=================================================================================================
59 //
60 // ISNAN SHIM
61 //
62 //=================================================================================================
63 
64 //*************************************************************************************************
78 template< typename T >
79 inline typename EnableIf< IsFloatingPoint<T>, bool >::Type isnan( T a )
80 {
81  return a != a;
82 }
83 //*************************************************************************************************
84 
85 } // namespace blaze
86 
87 #endif
bool isnan(const DenseMatrix< MT, SO > &dm)
Checks the given dense matrix for not-a-number elements.
Definition: DenseMatrix.h:640
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the IsFloatingPoint type trait.
Header file for the EnableIf class template.
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:184