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