Pow.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_FUNCTORS_POW_H_
36 #define _BLAZE_MATH_FUNCTORS_POW_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
44 #include <blaze/math/shims/Pow.h>
45 #include <blaze/math/simd/Pow.h>
47 #include <blaze/system/Inline.h>
48 
49 
50 namespace blaze {
51 
52 //=================================================================================================
53 //
54 // CLASS DEFINITION
55 //
56 //=================================================================================================
57 
58 //*************************************************************************************************
62 struct Pow
63 {
64  public:
65  //**********************************************************************************************
68  explicit inline Pow()
69  {}
70  //**********************************************************************************************
71 
72  //**********************************************************************************************
79  template< typename T1, typename T2 >
80  BLAZE_ALWAYS_INLINE decltype(auto) operator()( const T1& a, const T2& b ) const
81  {
82  return pow( a, b );
83  }
84  //**********************************************************************************************
85 
86  //**********************************************************************************************
91  template< typename T1, typename T2 >
92  static constexpr bool simdEnabled() { return HasSIMDPow<T1,T2>::value; }
93  //**********************************************************************************************
94 
95  //**********************************************************************************************
102  template< typename T1, typename T2 >
103  BLAZE_ALWAYS_INLINE decltype(auto) load( const T1& a, const T2& b ) const
104  {
107  return pow( a, b );
108  }
109  //**********************************************************************************************
110 };
111 //*************************************************************************************************
112 
113 } // namespace blaze
114 
115 #endif
decltype(auto) pow(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise exponential value for the dense matrices lhs and rhs.
Definition: DMatDMatMapExpr.h:1267
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
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
Availability of a SIMD power operation for the given data type.Depending on the available instruction...
Definition: HasSIMDPow.h:112
Header file for the SIMD power functionality.
Constraint on the data type.
decltype(auto) BLAZE_ALWAYS_INLINE load(const T1 &a, const T2 &b) const
Returns the result of the pow() function for the given SIMD vector.
Definition: Pow.h:103
Generic wrapper for the pow() function.
Definition: Pow.h:62
Pow()
Constructor of the Pow functor.
Definition: Pow.h:68
Header file for the HasSIMDPow type trait.
static constexpr bool simdEnabled()
Returns whether SIMD is enabled for the specified data types T1 and T2.
Definition: Pow.h:92
System settings for the inline keywords.