Exp10.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_FUNCTORS_EXP10_H_
36 #define _BLAZE_MATH_FUNCTORS_EXP10_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
44 #include <blaze/math/shims/Pow.h>
45 #include <blaze/math/simd/Exp10.h>
47 #include <blaze/system/Inline.h>
48 
49 
50 namespace blaze {
51 
52 //=================================================================================================
53 //
54 // CLASS DEFINITION
55 //
56 //=================================================================================================
57 
58 //*************************************************************************************************
62 struct Exp10
63 {
64  //**********************************************************************************************
67  explicit inline Exp10()
68  {}
69  //**********************************************************************************************
70 
71  //**********************************************************************************************
77  template< typename T >
78  BLAZE_ALWAYS_INLINE decltype(auto) operator()( const T& a ) const
79  {
80  return pow( T(10), a );
81  }
82  //**********************************************************************************************
83 
84  //**********************************************************************************************
89  template< typename T >
90  static constexpr bool simdEnabled() { return HasSIMDExp10<T>::value; }
91  //**********************************************************************************************
92 
93  //**********************************************************************************************
99  template< typename T >
100  BLAZE_ALWAYS_INLINE decltype(auto) load( const T& a ) const
101  {
103  return exp10( a );
104  }
105  //**********************************************************************************************
106 };
107 //*************************************************************************************************
108 
109 } // namespace blaze
110 
111 #endif
Header file for the HasSIMDExp10 type trait.
decltype(auto) exp10(const DenseMatrix< MT, SO > &dm)
Computes for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1696
decltype(auto) BLAZE_ALWAYS_INLINE load(const T &a) const
Returns the result of the exp10() function for the given SIMD vector.
Definition: Exp10.h:100
Header file for the pow shim.
#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
Availability of a SIMD exp10() operation for the given data type.Depending on the available instructi...
Definition: HasSIMDExp10.h:110
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
Generic wrapper for the exp10() function.
Definition: Exp10.h:62
Exp10()
Default constructor of the Exp10 functor.
Definition: Exp10.h:67
Constraint on the data type.
decltype(auto) pow(const DenseMatrix< MT, SO > &dm, ET exp)
Computes the exponential value for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1607
static constexpr bool simdEnabled()
Returns whether SIMD is enabled for the specified data type T.
Definition: Exp10.h:90
System settings for the inline keywords.
Header file for the SIMD exp10 functionality.