Blaze 3.9
IsNaN.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_SHIMS_ISNAN_H_
36#define _BLAZE_MATH_SHIMS_ISNAN_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
43#include <blaze/system/Inline.h>
44#include <blaze/util/EnableIf.h>
46
47
48//*************************************************************************************************
49// Macro undefinition
50//*************************************************************************************************
51
52#ifdef isnan
53# undef isnan
54#endif
55
56
57namespace blaze {
58
59//=================================================================================================
60//
61// ISNAN SHIM
62//
63//=================================================================================================
64
65//*************************************************************************************************
78template< typename T, EnableIf_t< IsNumeric_v<T> >* = nullptr >
79BLAZE_ALWAYS_INLINE bool isnan( T a ) noexcept
80{
81 return a != a;
82}
83//*************************************************************************************************
84
85} // namespace blaze
86
87#endif
Header file for the EnableIf class template.
Header file for the IsNumeric type trait.
BLAZE_ALWAYS_INLINE bool isnan(T a) noexcept
Platform independent implementation of the C99 isnan function.
Definition: IsNaN.h:79
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
System settings for the inline keywords.