Pow3.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_FUNCTORS_POW3_H_
36 #define _BLAZE_MATH_FUNCTORS_POW3_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
44 #include <blaze/math/shims/Pow3.h>
46 #include <blaze/system/Inline.h>
47 
48 
49 namespace blaze {
50 
51 //=================================================================================================
52 //
53 // CLASS DEFINITION
54 //
55 //=================================================================================================
56 
57 //*************************************************************************************************
61 struct Pow3
62 {
63  //**********************************************************************************************
66  explicit inline Pow3()
67  {}
68  //**********************************************************************************************
69 
70  //**********************************************************************************************
76  template< typename T >
77  BLAZE_ALWAYS_INLINE constexpr decltype(auto) operator()( const T& a ) const
78  {
79  return pow3( a );
80  }
81  //**********************************************************************************************
82 
83  //**********************************************************************************************
88  template< typename T >
89  static constexpr bool simdEnabled() { return HasSIMDMult<T,T>::value; }
90  //**********************************************************************************************
91 
92  //**********************************************************************************************
98  template< typename T >
99  BLAZE_ALWAYS_INLINE decltype(auto) load( const T& a ) const
100  {
102  return pow3( a );
103  }
104  //**********************************************************************************************
105 };
106 //*************************************************************************************************
107 
108 } // namespace blaze
109 
110 #endif
BLAZE_ALWAYS_INLINEdecltype(auto) constexpr pow3(const T &a) noexcept(noexcept(a *a *a))
Cubing the given value/object.
Definition: Pow3.h:65
Availability of a SIMD multiplication for the given data types.Depending on the available instruction...
Definition: HasSIMDMult.h:172
Pow3()
Default constructor of the Pow3 functor.
Definition: Pow3.h:66
#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
decltype(auto) BLAZE_ALWAYS_INLINE load(const T &a) const
Returns the result of the pow3() function for the given SIMD vector.
Definition: Pow3.h:99
Constraint on the data type.
Header file for the pow3 shim.
Header file for the HasSIMDMult type trait.
static constexpr bool simdEnabled()
Returns whether SIMD is enabled for the specified data type T.
Definition: Pow3.h:89
Generic wrapper for the pow3() function.
Definition: Pow3.h:61
System settings for the inline keywords.