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 
44 #include <blaze/math/shims/Erfc.h>
45 #include <blaze/math/simd/Erfc.h>
51 #include <blaze/system/Inline.h>
52 
53 
54 namespace blaze {
55 
56 //=================================================================================================
57 //
58 // CLASS DEFINITION
59 //
60 //=================================================================================================
61 
62 //*************************************************************************************************
66 struct Erfc
67 {
68  //**********************************************************************************************
71  explicit inline Erfc()
72  {}
73  //**********************************************************************************************
74 
75  //**********************************************************************************************
81  template< typename T >
82  BLAZE_ALWAYS_INLINE decltype(auto) operator()( const T& a ) const
83  {
84  return erfc( a );
85  }
86  //**********************************************************************************************
87 
88  //**********************************************************************************************
93  template< typename T >
94  static constexpr bool simdEnabled() { return HasSIMDErfc_v<T>; }
95  //**********************************************************************************************
96 
97  //**********************************************************************************************
102  static constexpr bool paddingEnabled() { return false; }
103  //**********************************************************************************************
104 
105  //**********************************************************************************************
111  template< typename T >
112  BLAZE_ALWAYS_INLINE decltype(auto) load( const T& a ) const
113  {
115  return erfc( a );
116  }
117  //**********************************************************************************************
118 };
119 //*************************************************************************************************
120 
121 
122 
123 
124 //=================================================================================================
125 //
126 // YIELDSUNIFORM SPECIALIZATIONS
127 //
128 //=================================================================================================
129 
130 //*************************************************************************************************
132 template< typename T >
133 struct YieldsUniform<Erfc,T>
134  : public IsUniform<T>
135 {};
137 //*************************************************************************************************
138 
139 
140 
141 
142 //=================================================================================================
143 //
144 // YIELDSSYMMETRIC SPECIALIZATIONS
145 //
146 //=================================================================================================
147 
148 //*************************************************************************************************
150 template< typename MT >
151 struct YieldsSymmetric<Erfc,MT>
152  : public IsSymmetric<MT>
153 {};
155 //*************************************************************************************************
156 
157 } // namespace blaze
158 
159 #endif
Header file for the SIMD complementary error function (erfc) functionality.
static constexpr bool paddingEnabled()
Returns whether the operation supports padding, i.e. whether it can deal with zeros.
Definition: Erfc.h:102
decltype(auto) BLAZE_ALWAYS_INLINE load(const T &a) const
Returns the result of the erfc() function for the given SIMD vector.
Definition: Erfc.h:112
#define BLAZE_CONSTRAINT_MUST_BE_SIMD_PACK(T)
Constraint on the data type.In case the given data type T is not a SIMD pack, a compilation error is ...
Definition: SIMDPack.h:60
static constexpr bool simdEnabled()
Returns whether SIMD is enabled for the specified data type T.
Definition: Erfc.h:94
Header file for the IsUniform type trait.
Header file for the IsSymmetric type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
Header file for the erfc shim.
Constraint on the data type.
Header file for the YieldsUniform type trait.
Header file for the YieldsSymmetric type trait.
Generic wrapper for the erfc() function.
Definition: Erfc.h:66
Erfc()
Default constructor of the Erfc functor.
Definition: Erfc.h:71
decltype(auto) erfc(const DenseMatrix< MT, SO > &dm)
Computes the complementary error function for each single element of the dense matrix dm...
Definition: DMatMapExpr.h:2218
System settings for the inline keywords.
Header file for the HasSIMDErfc type trait.