Blaze 3.9
Loading...
Searching...
No Matches
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.
bool isZero(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a zero matrix.
Definition DenseMatrix.h:1819
bool isDefault(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the given diagonal matrix is in default state.
Definition DiagonalMatrix.h:169
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
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition EnableIf.h:138
System settings for the inline keywords.