Atanh.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_FUNCTORS_ATANH_H_
36 #define _BLAZE_MATH_FUNCTORS_ATANH_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
44 #include <blaze/math/shims/Atanh.h>
45 #include <blaze/math/simd/Atanh.h>
47 #include <blaze/system/Inline.h>
48 
49 
50 namespace blaze {
51 
52 //=================================================================================================
53 //
54 // CLASS DEFINITION
55 //
56 //=================================================================================================
57 
58 //*************************************************************************************************
62 struct Atanh
63 {
64  //**********************************************************************************************
70  template< typename T >
71  BLAZE_ALWAYS_INLINE auto operator()( const T& a ) const
72  {
73  return atanh( a );
74  }
75  //**********************************************************************************************
76 
77  //**********************************************************************************************
82  template< typename T >
83  static constexpr bool simdEnabled() { return HasSIMDAtanh<T>::value; }
84  //**********************************************************************************************
85 
86  //**********************************************************************************************
92  template< typename T >
93  BLAZE_ALWAYS_INLINE auto load( const T& a ) const
94  {
96  return atanh( a );
97  }
98  //**********************************************************************************************
99 };
100 //*************************************************************************************************
101 
102 } // namespace blaze
103 
104 #endif
Header file for the SIMD inverse hyperbolic tangent functionality.
BLAZE_ALWAYS_INLINE auto load(const T &a) const
Returns the result of the atanh() function for the given SIMD vector.
Definition: Atanh.h:93
#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
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
Availability of a SIMD inverse hyperbolic tangent operation for the given data type.Depending on the available instruction set (SSE, SSE2, SSE3, SSE4, AVX, AVX2, MIC, ...) and the used compiler, this type trait provides the information whether a SIMD inverse hyperbolic tangent operation exists for the given data type T (ignoring the cv-qualifiers). In case the SIMD operation is available, the value member constant is set to true, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to false, Type is FalseType, and the class derives from FalseType. The following example assumes that the Intel SVML is available:
Definition: HasSIMDAtanh.h:109
Constraint on the data type.
BLAZE_ALWAYS_INLINE auto operator()(const T &a) const
Returns the result of the atanh() function for the given object/value.
Definition: Atanh.h:71
Header file for the HasSIMDAtanh type trait.
const DMatForEachExpr< MT, Atanh, SO > atanh(const DenseMatrix< MT, SO > &dm)
Computes the inverse hyperbolic tangent for each single element of the dense matrix dm...
Definition: DMatForEachExpr.h:1880
Generic wrapper for the atanh() function.
Definition: Atanh.h:62
Header file for the atanh shim.
static constexpr bool simdEnabled()
Returns whether SIMD is enabled for the specified data type T.
Definition: Atanh.h:83
System settings for the inline keywords.