Erf.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_FUNCTORS_ERF_H_
36 #define _BLAZE_MATH_FUNCTORS_ERF_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
44 #include <blaze/math/shims/Erf.h>
45 #include <blaze/math/simd/Erf.h>
61 #include <blaze/system/Inline.h>
62 
63 
64 namespace blaze {
65 
66 //=================================================================================================
67 //
68 // CLASS DEFINITION
69 //
70 //=================================================================================================
71 
72 //*************************************************************************************************
76 struct Erf
77 {
78  //**********************************************************************************************
81  explicit inline Erf()
82  {}
83  //**********************************************************************************************
84 
85  //**********************************************************************************************
91  template< typename T >
92  BLAZE_ALWAYS_INLINE decltype(auto) operator()( const T& a ) const
93  {
94  return erf( a );
95  }
96  //**********************************************************************************************
97 
98  //**********************************************************************************************
103  template< typename T >
104  static constexpr bool simdEnabled() { return HasSIMDErf_v<T>; }
105  //**********************************************************************************************
106 
107  //**********************************************************************************************
112  static constexpr bool paddingEnabled() { return true; }
113  //**********************************************************************************************
114 
115  //**********************************************************************************************
121  template< typename T >
122  BLAZE_ALWAYS_INLINE decltype(auto) load( const T& a ) const
123  {
125  return erf( a );
126  }
127  //**********************************************************************************************
128 };
129 //*************************************************************************************************
130 
131 
132 
133 
134 //=================================================================================================
135 //
136 // YIELDSUNIFORM SPECIALIZATIONS
137 //
138 //=================================================================================================
139 
140 //*************************************************************************************************
142 template< typename T >
143 struct YieldsUniform<Erf,T>
144  : public IsUniform<T>
145 {};
147 //*************************************************************************************************
148 
149 
150 
151 
152 //=================================================================================================
153 //
154 // YIELDSSYMMETRIC SPECIALIZATIONS
155 //
156 //=================================================================================================
157 
158 //*************************************************************************************************
160 template< typename MT >
161 struct YieldsSymmetric<Erf,MT>
162  : public IsSymmetric<MT>
163 {};
165 //*************************************************************************************************
166 
167 
168 
169 
170 //=================================================================================================
171 //
172 // YIELDSLOWER SPECIALIZATIONS
173 //
174 //=================================================================================================
175 
176 //*************************************************************************************************
178 template< typename MT >
179 struct YieldsLower<Erf,MT>
180  : public IsLower<MT>
181 {};
183 //*************************************************************************************************
184 
185 
186 
187 
188 //=================================================================================================
189 //
190 // YIELDSSTRICTLYLOWER SPECIALIZATIONS
191 //
192 //=================================================================================================
193 
194 //*************************************************************************************************
196 template< typename MT >
197 struct YieldsStrictlyLower<Erf,MT>
198  : public IsStrictlyLower<MT>
199 {};
201 //*************************************************************************************************
202 
203 
204 
205 
206 //=================================================================================================
207 //
208 // YIELDSUPPER SPECIALIZATIONS
209 //
210 //=================================================================================================
211 
212 //*************************************************************************************************
214 template< typename MT >
215 struct YieldsUpper<Erf,MT>
216  : public IsUpper<MT>
217 {};
219 //*************************************************************************************************
220 
221 
222 
223 
224 //=================================================================================================
225 //
226 // YIELDSSTRICTLYUPPER SPECIALIZATIONS
227 //
228 //=================================================================================================
229 
230 //*************************************************************************************************
232 template< typename MT >
233 struct YieldsStrictlyUpper<Erf,MT>
234  : public IsStrictlyUpper<MT>
235 {};
237 //*************************************************************************************************
238 
239 
240 
241 
242 //=================================================================================================
243 //
244 // YIELDSZERO SPECIALIZATIONS
245 //
246 //=================================================================================================
247 
248 //*************************************************************************************************
250 template< typename T >
251 struct YieldsZero<Erf,T>
252  : public IsZero<T>
253 {};
255 //*************************************************************************************************
256 
257 } // namespace blaze
258 
259 #endif
Header file for the YieldsStrictlyLower type trait.
Header file for the YieldsZero type trait.
decltype(auto) erf(const DenseMatrix< MT, SO > &dm)
Computes the error function for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:2189
#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 paddingEnabled()
Returns whether the operation supports padding, i.e. whether it can deal with zeros.
Definition: Erf.h:112
Header file for the HasSIMDErf type trait.
Header file for the IsUniform type trait.
Header file for the IsStrictlyUpper 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 SIMD error function (erf) functionality.
Header file for the YieldsStrictlyUpper type trait.
Header file for the erf shim.
Header file for the IsLower type trait.
Generic wrapper for the erf() function.
Definition: Erf.h:76
Constraint on the data type.
Header file for the IsStrictlyLower type trait.
Header file for the YieldsUniform type trait.
Header file for the YieldsSymmetric type trait.
Header file for the YieldsUpper type trait.
Header file for the IsZero type trait.
static constexpr bool simdEnabled()
Returns whether SIMD is enabled for the specified data type T.
Definition: Erf.h:104
Header file for the YieldsLower type trait.
Erf()
Default constructor of the Erf functor.
Definition: Erf.h:81
Header file for the IsUpper type trait.
decltype(auto) BLAZE_ALWAYS_INLINE load(const T &a) const
Returns the result of the erf() function for the given SIMD vector.
Definition: Erf.h:122
System settings for the inline keywords.