Blaze 3.9
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
46#include <blaze/system/Inline.h>
47#include <blaze/util/EnableIf.h>
48
49
50namespace blaze {
51
52//=================================================================================================
53//
54// ISZERO SHIM
55//
56//=================================================================================================
57
58//*************************************************************************************************
100template< RelaxationFlag RF // Relaxation flag
101 , typename Type // Type of the given value/object
102 , EnableIf_t< IsScalar_v<Type> >* = nullptr >
103BLAZE_ALWAYS_INLINE bool isZero( const Type& v ) noexcept
104{
105 return isDefault<RF>( v );
106}
107//*************************************************************************************************
108
109
110//*************************************************************************************************
152template< typename Type > // Type of the given value/object
153BLAZE_ALWAYS_INLINE bool isZero( const Type& v ) noexcept
154{
155 return isZero<relaxed>( v );
156}
157//*************************************************************************************************
158
159} // namespace blaze
160
161#endif
Header file for the EnableIf class template.
Header file for the isDefault shim.
Header file for the IsScalar type trait.
Header file for the relaxation flag enumeration.
BLAZE_ALWAYS_INLINE bool isZero(const Type &v) noexcept
Returns whether the given value/object represents the numeric value 0.
Definition: IsZero.h:153
RelaxationFlag
Relaxation flag for strict or relaxed semantics.
Definition: RelaxationFlag.h:66
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
System settings for the inline keywords.