28 #ifndef VC_COMMON_TRIGONOMETRIC_H_
29 #define VC_COMMON_TRIGONOMETRIC_H_
33 namespace Vc_VERSIONED_NAMESPACE
37 template<Vc::Implementation Impl>
struct MapImpl {
enum Dummy { Value = Impl }; };
38 template<>
struct MapImpl<
Vc::
SSE42Impl> {
enum Dummy { Value = MapImpl<Vc::SSE41Impl>::Value }; };
40 template<Vc::Implementation Impl>
using TrigonometricImplementation =
41 ImplementationT<MapImpl<Impl>::Value
42 #if defined(Vc_IMPL_XOP) && defined(Vc_IMPL_FMA4)
51 template<
typename Impl>
struct Trigonometric
53 template<
typename T>
static T
sin(
const T &_x);
54 template<
typename T>
static T
cos(
const T &_x);
55 template<
typename T>
static void sincos(
const T &_x, T *_sin, T *_cos);
56 template<
typename T>
static T
asin (
const T &_x);
57 template<
typename T>
static T
atan (
const T &_x);
58 template<
typename T>
static T
atan2(
const T &y,
const T &x);
66 template <
typename T,
typename Abi>
67 using Trig = Common::Trigonometric<Detail::TrigonometricImplementation<
68 (std::is_same<Abi, VectorAbi::Sse>::value
76 template <
typename T,
typename Abi> Vc_INTRINSIC Vector<T, Abi>
atan2(
const Vector<T, Abi> &y,
const Vector<T, Abi> &x) {
return Detail::Trig<T, Abi>::atan2(y, x); }
81 #endif // VC_COMMON_TRIGONOMETRIC_H_
Vc::Vector< T > sin(const Vc::Vector< T > &v)
Vc::Vector< T > cos(const Vc::Vector< T > &v)
Support for XOP instructions.
Vc::Vector< T > atan2(const Vc::Vector< T > &y, const Vc::Vector< T > &x)
Calculates the angle given the lengths of the opposite and adjacent legs in a right triangle...
Vc::Vector< T > atan(const Vc::Vector< T > &v)
Vc::Vector< T > asin(const Vc::Vector< T > &v)
x86 SSE + SSE2 + SSE3 + SSSE3 + SSE4.1 + SSE4.2
Support for FMA4 instructions.
Vector Classes Namespace.
uses only fundamental types
void sincos(const SimdArray< T, N > &x, SimdArray< T, N > *sin, SimdArray< T, N > *cos)
Determines sine and cosine concurrently and component-wise on x.