Blaze 3.9
Erfc.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_FUNCTORS_ERFC_H_
36#define _BLAZE_MATH_FUNCTORS_ERFC_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
43#include <utility>
53#include <blaze/system/Inline.h>
54
55
56namespace blaze {
57
58//=================================================================================================
59//
60// CLASS DEFINITION
61//
62//=================================================================================================
63
64//*************************************************************************************************
68struct Erfc
69{
70 //**********************************************************************************************
76 template< typename T >
77 BLAZE_ALWAYS_INLINE BLAZE_DEVICE_CALLABLE decltype(auto) operator()( T&& a ) const
78 {
79 return erfc( std::forward<T>( a ) );
80 }
81 //**********************************************************************************************
82
83 //**********************************************************************************************
88 template< typename T >
89 static constexpr bool simdEnabled() { return HasSIMDErfc_v<T>; }
90 //**********************************************************************************************
91
92 //**********************************************************************************************
97 static constexpr bool paddingEnabled() { return false; }
98 //**********************************************************************************************
99
100 //**********************************************************************************************
106 template< typename T >
107 BLAZE_ALWAYS_INLINE decltype(auto) load( const T& a ) const
108 {
110 return erfc( a );
111 }
112 //**********************************************************************************************
113};
114//*************************************************************************************************
115
116
117
118
119//=================================================================================================
120//
121// YIELDSUNIFORM SPECIALIZATIONS
122//
123//=================================================================================================
124
125//*************************************************************************************************
127template< typename T >
128struct YieldsUniform<Erfc,T>
129 : public IsUniform<T>
130{};
132//*************************************************************************************************
133
134
135
136
137//=================================================================================================
138//
139// YIELDSSYMMETRIC SPECIALIZATIONS
140//
141//=================================================================================================
142
143//*************************************************************************************************
145template< typename MT >
146struct YieldsSymmetric<Erfc,MT>
147 : public IsSymmetric<MT>
148{};
150//*************************************************************************************************
151
152} // namespace blaze
153
154#endif
Header file for the HasSIMDErfc type trait.
Macro for CUDA compatibility.
Header file for the IsSymmetric type trait.
Header file for the IsUniform type trait.
Header file for the YieldsSymmetric type trait.
Header file for the YieldsUniform type trait.
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_BE_SIMD_PACK(T)
Constraint on the data type.
Definition: SIMDPack.h:60
BLAZE_ALWAYS_INLINE const SIMDdouble erfc(const SIMDf64< T > &a) noexcept=delete
Computes the complementary error function for a vector of double precision floating point values.
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
#define BLAZE_DEVICE_CALLABLE
Conditional macro that sets host and device attributes when compiled with CUDA.
Definition: HostDevice.h:94
Header file for the erfc shim.
Header file for the SIMD complementary error function (erfc) functionality.
Generic wrapper for the erfc() function.
Definition: Erfc.h:69
static constexpr bool paddingEnabled()
Returns whether the operation supports padding, i.e. whether it can deal with zeros.
Definition: Erfc.h:97
BLAZE_ALWAYS_INLINE decltype(auto) load(const T &a) const
Returns the result of the erfc() function for the given SIMD vector.
Definition: Erfc.h:107
static constexpr bool simdEnabled()
Returns whether SIMD is enabled for the specified data type T.
Definition: Erfc.h:89
System settings for the inline keywords.