Blaze  3.6
Asinh.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_FUNCTORS_ASINH_H_
36 #define _BLAZE_MATH_FUNCTORS_ASINH_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
44 #include <blaze/math/shims/Asinh.h>
45 #include <blaze/math/simd/Asinh.h>
64 #include <blaze/system/Inline.h>
65 
66 
67 namespace blaze {
68 
69 //=================================================================================================
70 //
71 // CLASS DEFINITION
72 //
73 //=================================================================================================
74 
75 //*************************************************************************************************
79 struct Asinh
80 {
81  //**********************************************************************************************
87  template< typename T >
88  BLAZE_ALWAYS_INLINE BLAZE_DEVICE_CALLABLE decltype(auto) operator()( const T& a ) const
89  {
90  return asinh( a );
91  }
92  //**********************************************************************************************
93 
94  //**********************************************************************************************
99  template< typename T >
100  static constexpr bool simdEnabled() { return HasSIMDAsinh_v<T>; }
101  //**********************************************************************************************
102 
103  //**********************************************************************************************
108  static constexpr bool paddingEnabled() { return true; }
109  //**********************************************************************************************
110 
111  //**********************************************************************************************
117  template< typename T >
118  BLAZE_ALWAYS_INLINE decltype(auto) load( const T& a ) const
119  {
121  return asinh( a );
122  }
123  //**********************************************************************************************
124 };
125 //*************************************************************************************************
126 
127 
128 
129 
130 //=================================================================================================
131 //
132 // YIELDSUNIFORM SPECIALIZATIONS
133 //
134 //=================================================================================================
135 
136 //*************************************************************************************************
138 template< typename T >
139 struct YieldsUniform<Asinh,T>
140  : public IsUniform<T>
141 {};
143 //*************************************************************************************************
144 
145 
146 
147 
148 //=================================================================================================
149 //
150 // YIELDSSYMMETRIC SPECIALIZATIONS
151 //
152 //=================================================================================================
153 
154 //*************************************************************************************************
156 template< typename MT >
157 struct YieldsSymmetric<Asinh,MT>
158  : public IsSymmetric<MT>
159 {};
161 //*************************************************************************************************
162 
163 
164 
165 
166 //=================================================================================================
167 //
168 // YIELDSHERMITIAN SPECIALIZATIONS
169 //
170 //=================================================================================================
171 
172 //*************************************************************************************************
174 template< typename MT >
175 struct YieldsHermitian<Asinh,MT>
176  : public IsHermitian<MT>
177 {};
179 //*************************************************************************************************
180 
181 
182 
183 
184 //=================================================================================================
185 //
186 // YIELDSLOWER SPECIALIZATIONS
187 //
188 //=================================================================================================
189 
190 //*************************************************************************************************
192 template< typename MT >
193 struct YieldsLower<Asinh,MT>
194  : public IsLower<MT>
195 {};
197 //*************************************************************************************************
198 
199 
200 
201 
202 //=================================================================================================
203 //
204 // YIELDSSTRICTLYLOWER SPECIALIZATIONS
205 //
206 //=================================================================================================
207 
208 //*************************************************************************************************
210 template< typename MT >
211 struct YieldsStrictlyLower<Asinh,MT>
212  : public IsStrictlyLower<MT>
213 {};
215 //*************************************************************************************************
216 
217 
218 
219 
220 //=================================================================================================
221 //
222 // YIELDSUPPER SPECIALIZATIONS
223 //
224 //=================================================================================================
225 
226 //*************************************************************************************************
228 template< typename MT >
229 struct YieldsUpper<Asinh,MT>
230  : public IsUpper<MT>
231 {};
233 //*************************************************************************************************
234 
235 
236 
237 
238 //=================================================================================================
239 //
240 // YIELDSSTRICTLYUPPER SPECIALIZATIONS
241 //
242 //=================================================================================================
243 
244 //*************************************************************************************************
246 template< typename MT >
247 struct YieldsStrictlyUpper<Asinh,MT>
248  : public IsStrictlyUpper<MT>
249 {};
251 //*************************************************************************************************
252 
253 
254 
255 
256 //=================================================================================================
257 //
258 // YIELDSZERO SPECIALIZATIONS
259 //
260 //=================================================================================================
261 
262 //*************************************************************************************************
264 template< typename T >
265 struct YieldsZero<Asinh,T>
266  : public IsZero<T>
267 {};
269 //*************************************************************************************************
270 
271 } // namespace blaze
272 
273 #endif
Header file for the YieldsStrictlyLower type trait.
Header file for the YieldsZero type trait.
Header file for the SIMD inverse hyperbolic sine functionality.
#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
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 YieldsStrictlyUpper type trait.
Header file for the IsLower type trait.
decltype(auto) asinh(const DenseMatrix< MT, SO > &dm)
Computes the inverse hyperbolic sine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1896
Constraint on the data type.
Header file for the IsStrictlyLower type trait.
Header file for the HasSIMDAsinh type trait.
Header file for the YieldsUniform type trait.
Header file for the YieldsSymmetric type trait.
Generic wrapper for the asinh() function.
Definition: Asinh.h:79
Header file for the YieldsUpper type trait.
Header file for the IsZero type trait.
Header file for the YieldsLower type trait.
Header file for the asinh shim.
Macro for CUDA compatibility.
static constexpr bool simdEnabled()
Returns whether SIMD is enabled for the specified data type T.
Definition: Asinh.h:100
#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.
Header file for the YieldsHermitian type trait.
Header file for the IsHermitian type trait.
System settings for the inline keywords.
decltype(auto) BLAZE_ALWAYS_INLINE load(const T &a) const
Returns the result of the asinh() function for the given SIMD vector.
Definition: Asinh.h:118
static constexpr bool paddingEnabled()
Returns whether the operation supports padding, i.e. whether it can deal with zeros.
Definition: Asinh.h:108