Blaze  3.6
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>
62 #include <blaze/system/Inline.h>
63 
64 
65 namespace blaze {
66 
67 //=================================================================================================
68 //
69 // CLASS DEFINITION
70 //
71 //=================================================================================================
72 
73 //*************************************************************************************************
77 struct Erf
78 {
79  //**********************************************************************************************
85  template< typename T >
86  BLAZE_ALWAYS_INLINE BLAZE_DEVICE_CALLABLE decltype(auto) operator()( const T& a ) const
87  {
88  return erf( a );
89  }
90  //**********************************************************************************************
91 
92  //**********************************************************************************************
97  template< typename T >
98  static constexpr bool simdEnabled() { return HasSIMDErf_v<T>; }
99  //**********************************************************************************************
100 
101  //**********************************************************************************************
106  static constexpr bool paddingEnabled() { return true; }
107  //**********************************************************************************************
108 
109  //**********************************************************************************************
115  template< typename T >
116  BLAZE_ALWAYS_INLINE decltype(auto) load( const T& a ) const
117  {
119  return erf( a );
120  }
121  //**********************************************************************************************
122 };
123 //*************************************************************************************************
124 
125 
126 
127 
128 //=================================================================================================
129 //
130 // YIELDSUNIFORM SPECIALIZATIONS
131 //
132 //=================================================================================================
133 
134 //*************************************************************************************************
136 template< typename T >
137 struct YieldsUniform<Erf,T>
138  : public IsUniform<T>
139 {};
141 //*************************************************************************************************
142 
143 
144 
145 
146 //=================================================================================================
147 //
148 // YIELDSSYMMETRIC SPECIALIZATIONS
149 //
150 //=================================================================================================
151 
152 //*************************************************************************************************
154 template< typename MT >
155 struct YieldsSymmetric<Erf,MT>
156  : public IsSymmetric<MT>
157 {};
159 //*************************************************************************************************
160 
161 
162 
163 
164 //=================================================================================================
165 //
166 // YIELDSLOWER SPECIALIZATIONS
167 //
168 //=================================================================================================
169 
170 //*************************************************************************************************
172 template< typename MT >
173 struct YieldsLower<Erf,MT>
174  : public IsLower<MT>
175 {};
177 //*************************************************************************************************
178 
179 
180 
181 
182 //=================================================================================================
183 //
184 // YIELDSSTRICTLYLOWER SPECIALIZATIONS
185 //
186 //=================================================================================================
187 
188 //*************************************************************************************************
190 template< typename MT >
191 struct YieldsStrictlyLower<Erf,MT>
192  : public IsStrictlyLower<MT>
193 {};
195 //*************************************************************************************************
196 
197 
198 
199 
200 //=================================================================================================
201 //
202 // YIELDSUPPER SPECIALIZATIONS
203 //
204 //=================================================================================================
205 
206 //*************************************************************************************************
208 template< typename MT >
209 struct YieldsUpper<Erf,MT>
210  : public IsUpper<MT>
211 {};
213 //*************************************************************************************************
214 
215 
216 
217 
218 //=================================================================================================
219 //
220 // YIELDSSTRICTLYUPPER SPECIALIZATIONS
221 //
222 //=================================================================================================
223 
224 //*************************************************************************************************
226 template< typename MT >
227 struct YieldsStrictlyUpper<Erf,MT>
228  : public IsStrictlyUpper<MT>
229 {};
231 //*************************************************************************************************
232 
233 
234 
235 
236 //=================================================================================================
237 //
238 // YIELDSZERO SPECIALIZATIONS
239 //
240 //=================================================================================================
241 
242 //*************************************************************************************************
244 template< typename T >
245 struct YieldsZero<Erf,T>
246  : public IsZero<T>
247 {};
249 //*************************************************************************************************
250 
251 } // namespace blaze
252 
253 #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:2160
#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:106
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:77
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:98
Header file for the YieldsLower type trait.
Macro for CUDA compatibility.
#define BLAZE_DEVICE_CALLABLE
Conditional macro that sets host and device attributes when compiled with CUDA.
Definition: HostDevice.h:94
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:116
System settings for the inline keywords.