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