IsZero.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_SHIMS_ISZERO_H_
36 #define _BLAZE_MATH_SHIMS_ISZERO_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
44 #include <blaze/system/Inline.h>
45 #include <blaze/util/DisableIf.h>
46 #include <blaze/util/EnableIf.h>
48 #include <blaze/util/Unused.h>
49 
50 
51 namespace blaze {
52 
53 //=================================================================================================
54 //
55 // ISZERO SHIM
56 //
57 //=================================================================================================
58 
59 //*************************************************************************************************
80 template< typename Type >
81 BLAZE_ALWAYS_INLINE typename EnableIf< IsNumeric<Type>, bool >::Type
82  isZero( const Type& v )
83 {
84  return isDefault( v );
85 }
86 //*************************************************************************************************
87 
88 
89 //*************************************************************************************************
97 template< typename Type >
98 BLAZE_ALWAYS_INLINE typename DisableIf< IsNumeric<Type>, bool >::Type
99  isZero( const Type& v )
100 {
101  UNUSED_PARAMETER( v );
102 
103  return false;
104 }
106 //*************************************************************************************************
107 
108 } // namespace blaze
109 
110 #endif
Header file for the UNUSED_PARAMETER function template.
void UNUSED_PARAMETER(const T1 &)
Suppression of unused parameter warnings.
Definition: Unused.h:81
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:547
Header file for the DisableIf class template.
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
Header file for the EnableIf class template.
Header file for the IsNumeric type trait.
Header file for the isDefault shim.
bool isZero(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is 0.
Definition: DiagonalProxy.h:589
System settings for the inline keywords.