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>
53 #include <blaze/system/Inline.h>
54 
55 
56 namespace blaze {
57 
58 //=================================================================================================
59 //
60 // CLASS DEFINITION
61 //
62 //=================================================================================================
63 
64 //*************************************************************************************************
68 struct Cosh
69 {
70  //**********************************************************************************************
73  explicit inline Cosh()
74  {}
75  //**********************************************************************************************
76 
77  //**********************************************************************************************
83  template< typename T >
84  BLAZE_ALWAYS_INLINE decltype(auto) operator()( const T& a ) const
85  {
86  return cosh( a );
87  }
88  //**********************************************************************************************
89 
90  //**********************************************************************************************
95  template< typename T >
96  static constexpr bool simdEnabled() { return HasSIMDCosh_v<T>; }
97  //**********************************************************************************************
98 
99  //**********************************************************************************************
104  static constexpr bool paddingEnabled() { return false; }
105  //**********************************************************************************************
106 
107  //**********************************************************************************************
113  template< typename T >
114  BLAZE_ALWAYS_INLINE decltype(auto) load( const T& a ) const
115  {
117  return cosh( a );
118  }
119  //**********************************************************************************************
120 };
121 //*************************************************************************************************
122 
123 
124 
125 
126 //=================================================================================================
127 //
128 // YIELDSUNIFORM SPECIALIZATIONS
129 //
130 //=================================================================================================
131 
132 //*************************************************************************************************
134 template< typename T >
135 struct YieldsUniform<Cosh,T>
136  : public IsUniform<T>
137 {};
139 //*************************************************************************************************
140 
141 
142 
143 
144 //=================================================================================================
145 //
146 // YIELDSSYMMETRIC SPECIALIZATIONS
147 //
148 //=================================================================================================
149 
150 //*************************************************************************************************
152 template< typename MT >
153 struct YieldsSymmetric<Cosh,MT>
154  : public IsSymmetric<MT>
155 {};
157 //*************************************************************************************************
158 
159 
160 
161 
162 //=================================================================================================
163 //
164 // YIELDSHERMITIAN SPECIALIZATIONS
165 //
166 //=================================================================================================
167 
168 //*************************************************************************************************
170 template< typename MT >
171 struct YieldsHermitian<Cosh,MT>
172  : public IsHermitian<MT>
173 {};
175 //*************************************************************************************************
176 
177 } // namespace blaze
178 
179 #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:96
static constexpr bool paddingEnabled()
Returns whether the operation supports padding, i.e. whether it can deal with zeros.
Definition: Cosh.h:104
Cosh()
Default constructor of the Cosh functor.
Definition: Cosh.h:73
#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:2006
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:114
Header file for the YieldsUniform type trait.
Header file for the YieldsSymmetric type trait.
Header file for the HasSIMDCosh type trait.
Header file for the SIMD hyperbolic cosine functionality.
Generic wrapper for the cosh() function.
Definition: Cosh.h:68
Header file for the YieldsHermitian type trait.
Header file for the IsHermitian type trait.
System settings for the inline keywords.