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 EnableIf_< IsNumeric<Type>, bool > isZero( const Type& v ) noexcept
82 {
83  return isDefault( v );
84 }
85 //*************************************************************************************************
86 
87 
88 //*************************************************************************************************
96 template< typename Type >
97 BLAZE_ALWAYS_INLINE DisableIf_< IsNumeric<Type>, bool > isZero( const Type& v ) noexcept
98 {
99  UNUSED_PARAMETER( v );
100 
101  return false;
102 }
104 //*************************************************************************************************
105 
106 } // namespace blaze
107 
108 #endif
Header file for the UNUSED_PARAMETER function template.
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:573
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.
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:223
bool isZero(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is 0.
Definition: DiagonalProxy.h:615
void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
System settings for the inline keywords.