Blaze 3.9
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
43#include <utility>
46#include <blaze/math/simd/Erf.h>
63#include <blaze/system/Inline.h>
64
65
66namespace blaze {
67
68//=================================================================================================
69//
70// CLASS DEFINITION
71//
72//=================================================================================================
73
74//*************************************************************************************************
78struct Erf
79{
80 //**********************************************************************************************
86 template< typename T >
87 BLAZE_ALWAYS_INLINE BLAZE_DEVICE_CALLABLE decltype(auto) operator()( T&& a ) const
88 {
89 return erf( std::forward<T>( a ) );
90 }
91 //**********************************************************************************************
92
93 //**********************************************************************************************
98 template< typename T >
99 static constexpr bool simdEnabled() { return HasSIMDErf_v<T>; }
100 //**********************************************************************************************
101
102 //**********************************************************************************************
107 static constexpr bool paddingEnabled() { return true; }
108 //**********************************************************************************************
109
110 //**********************************************************************************************
116 template< typename T >
117 BLAZE_ALWAYS_INLINE decltype(auto) load( const T& a ) const
118 {
120 return erf( a );
121 }
122 //**********************************************************************************************
123};
124//*************************************************************************************************
125
126
127
128
129//=================================================================================================
130//
131// YIELDSUNIFORM SPECIALIZATIONS
132//
133//=================================================================================================
134
135//*************************************************************************************************
137template< typename T >
138struct YieldsUniform<Erf,T>
139 : public IsUniform<T>
140{};
142//*************************************************************************************************
143
144
145
146
147//=================================================================================================
148//
149// YIELDSSYMMETRIC SPECIALIZATIONS
150//
151//=================================================================================================
152
153//*************************************************************************************************
155template< typename MT >
156struct YieldsSymmetric<Erf,MT>
157 : public IsSymmetric<MT>
158{};
160//*************************************************************************************************
161
162
163
164
165//=================================================================================================
166//
167// YIELDSLOWER SPECIALIZATIONS
168//
169//=================================================================================================
170
171//*************************************************************************************************
173template< typename MT >
174struct YieldsLower<Erf,MT>
175 : public IsLower<MT>
176{};
178//*************************************************************************************************
179
180
181
182
183//=================================================================================================
184//
185// YIELDSSTRICTLYLOWER SPECIALIZATIONS
186//
187//=================================================================================================
188
189//*************************************************************************************************
191template< typename MT >
192struct YieldsStrictlyLower<Erf,MT>
193 : public IsStrictlyLower<MT>
194{};
196//*************************************************************************************************
197
198
199
200
201//=================================================================================================
202//
203// YIELDSUPPER SPECIALIZATIONS
204//
205//=================================================================================================
206
207//*************************************************************************************************
209template< typename MT >
210struct YieldsUpper<Erf,MT>
211 : public IsUpper<MT>
212{};
214//*************************************************************************************************
215
216
217
218
219//=================================================================================================
220//
221// YIELDSSTRICTLYUPPER SPECIALIZATIONS
222//
223//=================================================================================================
224
225//*************************************************************************************************
227template< typename MT >
228struct YieldsStrictlyUpper<Erf,MT>
229 : public IsStrictlyUpper<MT>
230{};
232//*************************************************************************************************
233
234
235
236
237//=================================================================================================
238//
239// YIELDSZERO SPECIALIZATIONS
240//
241//=================================================================================================
242
243//*************************************************************************************************
245template< typename T >
246struct YieldsZero<Erf,T>
247 : public IsZero<T>
248{};
250//*************************************************************************************************
251
252} // namespace blaze
253
254#endif
Header file for the HasSIMDErf type trait.
Macro for CUDA compatibility.
Header file for the IsLower type trait.
Header file for the IsStrictlyLower type trait.
Header file for the IsStrictlyUpper type trait.
Header file for the IsSymmetric type trait.
Header file for the IsUniform type trait.
Header file for the IsUpper type trait.
Header file for the YieldsLower type trait.
Header file for the YieldsStrictlyLower type trait.
Header file for the YieldsStrictlyUpper type trait.
Header file for the YieldsSymmetric type trait.
Header file for the YieldsUniform type trait.
Header file for the YieldsUpper type trait.
Header file for the YieldsZero 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 erf(const SIMDf64< T > &a) noexcept=delete
Computes the 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 erf shim.
Header file for the SIMD error function (erf) functionality.
Generic wrapper for the erf() function.
Definition: Erf.h:79
BLAZE_ALWAYS_INLINE decltype(auto) load(const T &a) const
Returns the result of the erf() function for the given SIMD vector.
Definition: Erf.h:117
static constexpr bool paddingEnabled()
Returns whether the operation supports padding, i.e. whether it can deal with zeros.
Definition: Erf.h:107
static constexpr bool simdEnabled()
Returns whether SIMD is enabled for the specified data type T.
Definition: Erf.h:99
System settings for the inline keywords.
Header file for the IsZero type trait.