Blaze  3.6
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>
52 #include <blaze/system/Inline.h>
53 
54 
55 namespace blaze {
56 
57 //=================================================================================================
58 //
59 // CLASS DEFINITION
60 //
61 //=================================================================================================
62 
63 //*************************************************************************************************
67 struct Erfc
68 {
69  //**********************************************************************************************
75  template< typename T >
76  BLAZE_ALWAYS_INLINE BLAZE_DEVICE_CALLABLE decltype(auto) operator()( const T& a ) const
77  {
78  return erfc( a );
79  }
80  //**********************************************************************************************
81 
82  //**********************************************************************************************
87  template< typename T >
88  static constexpr bool simdEnabled() { return HasSIMDErfc_v<T>; }
89  //**********************************************************************************************
90 
91  //**********************************************************************************************
96  static constexpr bool paddingEnabled() { return false; }
97  //**********************************************************************************************
98 
99  //**********************************************************************************************
105  template< typename T >
106  BLAZE_ALWAYS_INLINE decltype(auto) load( const T& a ) const
107  {
109  return erfc( a );
110  }
111  //**********************************************************************************************
112 };
113 //*************************************************************************************************
114 
115 
116 
117 
118 //=================================================================================================
119 //
120 // YIELDSUNIFORM SPECIALIZATIONS
121 //
122 //=================================================================================================
123 
124 //*************************************************************************************************
126 template< typename T >
127 struct YieldsUniform<Erfc,T>
128  : public IsUniform<T>
129 {};
131 //*************************************************************************************************
132 
133 
134 
135 
136 //=================================================================================================
137 //
138 // YIELDSSYMMETRIC SPECIALIZATIONS
139 //
140 //=================================================================================================
141 
142 //*************************************************************************************************
144 template< typename MT >
145 struct YieldsSymmetric<Erfc,MT>
146  : public IsSymmetric<MT>
147 {};
149 //*************************************************************************************************
150 
151 } // namespace blaze
152 
153 #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:96
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:106
#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:88
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:67
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:2188
Macro for CUDA compatibility.
#define BLAZE_DEVICE_CALLABLE
Conditional macro that sets host and device attributes when compiled with CUDA.
Definition: HostDevice.h:94
System settings for the inline keywords.
Header file for the HasSIMDErfc type trait.