Blaze 3.9
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
43#include <utility>
46#include <blaze/math/simd/Pow.h>
49#include <blaze/system/Inline.h>
50
51
52namespace blaze {
53
54//=================================================================================================
55//
56// CLASS DEFINITION
57//
58//=================================================================================================
59
60//*************************************************************************************************
64struct Pow
65{
66 //**********************************************************************************************
73 template< typename T1, typename T2 >
74 BLAZE_ALWAYS_INLINE BLAZE_DEVICE_CALLABLE decltype(auto) operator()( T1&& a, T2&& b ) const
75 {
76 return pow( std::forward<T1>( a ), std::forward<T2>( b ) );
77 }
78 //**********************************************************************************************
79
80 //**********************************************************************************************
85 template< typename T1, typename T2 >
86 static constexpr bool simdEnabled() { return HasSIMDPow_v<T1,T2>; }
87 //**********************************************************************************************
88
89 //**********************************************************************************************
94 static constexpr bool paddingEnabled() { return false; }
95 //**********************************************************************************************
96
97 //**********************************************************************************************
104 template< typename T1, typename T2 >
105 BLAZE_ALWAYS_INLINE decltype(auto) load( const T1& a, const T2& b ) const
106 {
109 return pow( a, b );
110 }
111 //**********************************************************************************************
112};
113//*************************************************************************************************
114
115} // namespace blaze
116
117#endif
Header file for the HasSIMDPow type trait.
Macro for CUDA compatibility.
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_BE_SIMD_PACK(T)
Constraint on the data type.
Definition: SIMDPack.h:60
BLAZE_ALWAYS_INLINE const SIMDdouble pow(const SIMDf64< T1 > &a, const SIMDf64< T2 > &b) noexcept=delete
Computes the exponential value of a vector of double precision floating point values.
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
#define BLAZE_DEVICE_CALLABLE
Conditional macro that sets host and device attributes when compiled with CUDA.
Definition: HostDevice.h:94
Header file for the pow shim.
Header file for the SIMD power functionality.
Generic wrapper for the pow() function.
Definition: Pow.h:65
static constexpr bool paddingEnabled()
Returns whether the operation supports padding, i.e. whether it can deal with zeros.
Definition: Pow.h:94
static constexpr bool simdEnabled()
Returns whether SIMD is enabled for the specified data types T1 and T2.
Definition: Pow.h:86
BLAZE_ALWAYS_INLINE decltype(auto) load(const T1 &a, const T2 &b) const
Returns the result of the pow() function for the given SIMD vector.
Definition: Pow.h:105
System settings for the inline keywords.