Blaze 3.9
Tan.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_FUNCTORS_TAN_H_
36#define _BLAZE_MATH_FUNCTORS_TAN_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
43#include <utility>
46#include <blaze/math/simd/Tan.h>
65#include <blaze/system/Inline.h>
66
67
68namespace blaze {
69
70//=================================================================================================
71//
72// CLASS DEFINITION
73//
74//=================================================================================================
75
76//*************************************************************************************************
80struct Tan
81{
82 //**********************************************************************************************
88 template< typename T >
89 BLAZE_ALWAYS_INLINE BLAZE_DEVICE_CALLABLE decltype(auto) operator()( T&& a ) const
90 {
91 return tan( std::forward<T>( a ) );
92 }
93 //**********************************************************************************************
94
95 //**********************************************************************************************
100 template< typename T >
101 static constexpr bool simdEnabled() { return HasSIMDTan_v<T>; }
102 //**********************************************************************************************
103
104 //**********************************************************************************************
109 static constexpr bool paddingEnabled() { return true; }
110 //**********************************************************************************************
111
112 //**********************************************************************************************
118 template< typename T >
119 BLAZE_ALWAYS_INLINE decltype(auto) load( const T& a ) const
120 {
122 return tan( a );
123 }
124 //**********************************************************************************************
125};
126//*************************************************************************************************
127
128
129
130
131//=================================================================================================
132//
133// YIELDSUNIFORM SPECIALIZATIONS
134//
135//=================================================================================================
136
137//*************************************************************************************************
139template< typename T >
140struct YieldsUniform<Tan,T>
141 : public IsUniform<T>
142{};
144//*************************************************************************************************
145
146
147
148
149//=================================================================================================
150//
151// YIELDSSYMMETRIC SPECIALIZATIONS
152//
153//=================================================================================================
154
155//*************************************************************************************************
157template< typename MT >
158struct YieldsSymmetric<Tan,MT>
159 : public IsSymmetric<MT>
160{};
162//*************************************************************************************************
163
164
165
166
167//=================================================================================================
168//
169// YIELDSHERMITIAN SPECIALIZATIONS
170//
171//=================================================================================================
172
173//*************************************************************************************************
175template< typename MT >
176struct YieldsHermitian<Tan,MT>
177 : public IsHermitian<MT>
178{};
180//*************************************************************************************************
181
182
183
184
185//=================================================================================================
186//
187// YIELDSLOWER SPECIALIZATIONS
188//
189//=================================================================================================
190
191//*************************************************************************************************
193template< typename MT >
194struct YieldsLower<Tan,MT>
195 : public IsLower<MT>
196{};
198//*************************************************************************************************
199
200
201
202
203//=================================================================================================
204//
205// YIELDSSTRICTLYLOWER SPECIALIZATIONS
206//
207//=================================================================================================
208
209//*************************************************************************************************
211template< typename MT >
212struct YieldsStrictlyLower<Tan,MT>
213 : public IsStrictlyLower<MT>
214{};
216//*************************************************************************************************
217
218
219
220
221//=================================================================================================
222//
223// YIELDSUPPER SPECIALIZATIONS
224//
225//=================================================================================================
226
227//*************************************************************************************************
229template< typename MT >
230struct YieldsUpper<Tan,MT>
231 : public IsUpper<MT>
232{};
234//*************************************************************************************************
235
236
237
238
239//=================================================================================================
240//
241// YIELDSSTRICTLYUPPER SPECIALIZATIONS
242//
243//=================================================================================================
244
245//*************************************************************************************************
247template< typename MT >
248struct YieldsStrictlyUpper<Tan,MT>
249 : public IsStrictlyUpper<MT>
250{};
252//*************************************************************************************************
253
254
255
256
257//=================================================================================================
258//
259// YIELDSZERO SPECIALIZATIONS
260//
261//=================================================================================================
262
263//*************************************************************************************************
265template< typename T >
266struct YieldsZero<Tan,T>
267 : public IsZero<T>
268{};
270//*************************************************************************************************
271
272} // namespace blaze
273
274#endif
Header file for the HasSIMDTan type trait.
Macro for CUDA compatibility.
Header file for the IsHermitian type trait.
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 YieldsHermitian 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 tan(const SIMDf64< T > &a) noexcept=delete
Tangent of 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 tan shim.
Header file for the SIMD tangent functionality.
Generic wrapper for the tan() function.
Definition: Tan.h:81
static constexpr bool paddingEnabled()
Returns whether the operation supports padding, i.e. whether it can deal with zeros.
Definition: Tan.h:109
BLAZE_ALWAYS_INLINE decltype(auto) load(const T &a) const
Returns the result of the tan() function for the given SIMD vector.
Definition: Tan.h:119
static constexpr bool simdEnabled()
Returns whether SIMD is enabled for the specified data type T.
Definition: Tan.h:101
System settings for the inline keywords.
Header file for the IsZero type trait.