Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
shims
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
43
#include <
blaze/math/RelaxationFlag.h
>
44
#include <
blaze/math/shims/IsDefault.h
>
45
#include <
blaze/math/typetraits/IsScalar.h
>
46
#include <
blaze/system/Inline.h
>
47
#include <
blaze/util/EnableIf.h
>
48
49
50
namespace
blaze {
51
52
//=================================================================================================
53
//
54
// ISZERO SHIM
55
//
56
//=================================================================================================
57
58
//*************************************************************************************************
100
template
<
RelaxationFlag
RF
// Relaxation flag
101
,
typename
Type
// Type of the given value/object
102
,
EnableIf_t< IsScalar_v<Type>
>* =
nullptr
>
103
BLAZE_ALWAYS_INLINE
bool
isZero
(
const
Type
& v )
noexcept
104
{
105
return
isDefault<RF>
( v );
106
}
107
//*************************************************************************************************
108
109
110
//*************************************************************************************************
152
template
<
typename
Type >
// Type of the given value/object
153
BLAZE_ALWAYS_INLINE
bool
isZero
(
const
Type
& v )
noexcept
154
{
155
return
isZero<relaxed>
( v );
156
}
157
//*************************************************************************************************
158
159
}
// namespace blaze
160
161
#endif
EnableIf.h
Header file for the EnableIf class template.
IsDefault.h
Header file for the isDefault shim.
IsScalar.h
Header file for the IsScalar type trait.
RelaxationFlag.h
Header file for the relaxation flag enumeration.
blaze::Type
blaze::isZero
bool isZero(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a zero matrix.
Definition
DenseMatrix.h:1819
blaze::isDefault
bool isDefault(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the given diagonal matrix is in default state.
Definition
DiagonalMatrix.h:169
blaze::RelaxationFlag
RelaxationFlag
Relaxation flag for strict or relaxed semantics.
Definition
RelaxationFlag.h:66
BLAZE_ALWAYS_INLINE
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition
Inline.h:85
blaze::EnableIf_t
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition
EnableIf.h:138
Inline.h
System settings for the inline keywords.
Generated by
1.18.0