Blaze  3.6
Sinh.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_FUNCTORS_SINH_H_
36 #define _BLAZE_MATH_FUNCTORS_SINH_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
44 #include <blaze/math/shims/Sinh.h>
45 #include <blaze/math/simd/Sinh.h>
64 #include <blaze/system/Inline.h>
65 
66 
67 namespace blaze {
68 
69 //=================================================================================================
70 //
71 // CLASS DEFINITION
72 //
73 //=================================================================================================
74 
75 //*************************************************************************************************
79 struct Sinh
80 {
81  //**********************************************************************************************
87  template< typename T >
88  BLAZE_ALWAYS_INLINE BLAZE_DEVICE_CALLABLE decltype(auto) operator()( const T& a ) const
89  {
90  return sinh( a );
91  }
92  //**********************************************************************************************
93 
94  //**********************************************************************************************
99  template< typename T >
100  static constexpr bool simdEnabled() { return HasSIMDSinh_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 sinh( 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<Sinh,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<Sinh,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<Sinh,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<Sinh,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<Sinh,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<Sinh,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<Sinh,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<Sinh,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.
#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
decltype(auto) BLAZE_ALWAYS_INLINE load(const T &a) const
Returns the result of the sinh() function for the given SIMD vector.
Definition: Sinh.h:118
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
decltype(auto) sinh(const DenseMatrix< MT, SO > &dm)
Computes the hyperbolic sine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1868
Header file for the YieldsStrictlyUpper type trait.
Header file for the IsLower type trait.
static constexpr bool simdEnabled()
Returns whether SIMD is enabled for the specified data type T.
Definition: Sinh.h:100
Constraint on the data type.
Header file for the HasSIMDSinh type trait.
Header file for the IsStrictlyLower type trait.
Header file for the SIMD hyperbolic sine functionality.
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.
Header file for the YieldsLower type trait.
Macro for CUDA compatibility.
Generic wrapper for the sinh() function.
Definition: Sinh.h:79
#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 sinh shim.
Header file for the YieldsHermitian type trait.
Header file for the IsHermitian type trait.
System settings for the inline keywords.
static constexpr bool paddingEnabled()
Returns whether the operation supports padding, i.e. whether it can deal with zeros.
Definition: Sinh.h:108