Blaze  3.6
Cosh.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_FUNCTORS_COSH_H_
36 #define _BLAZE_MATH_FUNCTORS_COSH_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
44 #include <blaze/math/shims/Cosh.h>
45 #include <blaze/math/simd/Cosh.h>
54 #include <blaze/system/Inline.h>
55 
56 
57 namespace blaze {
58 
59 //=================================================================================================
60 //
61 // CLASS DEFINITION
62 //
63 //=================================================================================================
64 
65 //*************************************************************************************************
69 struct Cosh
70 {
71  //**********************************************************************************************
77  template< typename T >
78  BLAZE_ALWAYS_INLINE BLAZE_DEVICE_CALLABLE decltype(auto) operator()( const T& a ) const
79  {
80  return cosh( a );
81  }
82  //**********************************************************************************************
83 
84  //**********************************************************************************************
89  template< typename T >
90  static constexpr bool simdEnabled() { return HasSIMDCosh_v<T>; }
91  //**********************************************************************************************
92 
93  //**********************************************************************************************
98  static constexpr bool paddingEnabled() { return false; }
99  //**********************************************************************************************
100 
101  //**********************************************************************************************
107  template< typename T >
108  BLAZE_ALWAYS_INLINE decltype(auto) load( const T& a ) const
109  {
111  return cosh( a );
112  }
113  //**********************************************************************************************
114 };
115 //*************************************************************************************************
116 
117 
118 
119 
120 //=================================================================================================
121 //
122 // YIELDSUNIFORM SPECIALIZATIONS
123 //
124 //=================================================================================================
125 
126 //*************************************************************************************************
128 template< typename T >
129 struct YieldsUniform<Cosh,T>
130  : public IsUniform<T>
131 {};
133 //*************************************************************************************************
134 
135 
136 
137 
138 //=================================================================================================
139 //
140 // YIELDSSYMMETRIC SPECIALIZATIONS
141 //
142 //=================================================================================================
143 
144 //*************************************************************************************************
146 template< typename MT >
147 struct YieldsSymmetric<Cosh,MT>
148  : public IsSymmetric<MT>
149 {};
151 //*************************************************************************************************
152 
153 
154 
155 
156 //=================================================================================================
157 //
158 // YIELDSHERMITIAN SPECIALIZATIONS
159 //
160 //=================================================================================================
161 
162 //*************************************************************************************************
164 template< typename MT >
165 struct YieldsHermitian<Cosh,MT>
166  : public IsHermitian<MT>
167 {};
169 //*************************************************************************************************
170 
171 } // namespace blaze
172 
173 #endif
Header file for the cosh shim.
static constexpr bool simdEnabled()
Returns whether SIMD is enabled for the specified data type T.
Definition: Cosh.h:90
static constexpr bool paddingEnabled()
Returns whether the operation supports padding, i.e. whether it can deal with zeros.
Definition: Cosh.h:98
#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 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) cosh(const DenseMatrix< MT, SO > &dm)
Computes the hyperbolic cosine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1983
Constraint on the data type.
decltype(auto) BLAZE_ALWAYS_INLINE load(const T &a) const
Returns the result of the cosh() function for the given SIMD vector.
Definition: Cosh.h:108
Header file for the YieldsUniform type trait.
Header file for the YieldsSymmetric type trait.
Header file for the HasSIMDCosh type trait.
Macro for CUDA compatibility.
Header file for the SIMD hyperbolic cosine functionality.
#define BLAZE_DEVICE_CALLABLE
Conditional macro that sets host and device attributes when compiled with CUDA.
Definition: HostDevice.h:94
Generic wrapper for the cosh() function.
Definition: Cosh.h:69
Header file for the YieldsHermitian type trait.
Header file for the IsHermitian type trait.
System settings for the inline keywords.