ROOT  6.06/09
Reference Guide
trigonometric.h
Go to the documentation of this file.
1 /* This file is part of the Vc library.
2 
3  Copyright (C) 2009-2012 Matthias Kretz <kretz@kde.org>
4 
5  Vc is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as
7  published by the Free Software Foundation, either version 3 of
8  the License, or (at your option) any later version.
9 
10  Vc is distributed in the hope that it will be useful, but
11  WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with Vc. If not, see <http://www.gnu.org/licenses/>.
17 
18 */
19 
20 #ifndef VC_COMMON_TRIGONOMETRIC_H
21 #define VC_COMMON_TRIGONOMETRIC_H
22 
23 #ifndef VC__USE_NAMESPACE
24 #error "Do not include Vc/common/trigonometric.h outside of Vc itself"
25 #endif
26 
27 #include "macros.h"
28 namespace ROOT {
29 namespace Vc
30 {
31 namespace
32 {
33  using Vc::VC__USE_NAMESPACE::Vector;
34 } // namespace
35 
36 namespace Internal
37 {
38 template<Vc::Implementation Impl> struct MapImpl { enum Dummy { Value = Impl }; };
39 template<> struct MapImpl<Vc::SSE42Impl> { enum Dummy { Value = MapImpl<Vc::SSE41Impl>::Value }; };
41 #if defined(VC_IMPL_XOP) && defined(VC_IMPL_FMA4)
44 #endif
46 } // namespace Internal
47 
48 template<typename Impl> struct Trigonometric
49 {
50  template<typename T> static Vector<T> sin(const Vector<T> &_x);
51  template<typename T> static Vector<T> cos(const Vector<T> &_x);
52  template<typename T> static void sincos(const Vector<T> &_x, Vector<T> *_sin, Vector<T> *_cos);
53  template<typename T> static Vector<T> asin (const Vector<T> &_x);
54  template<typename T> static Vector<T> atan (const Vector<T> &_x);
55  template<typename T> static Vector<T> atan2(const Vector<T> &y, const Vector<T> &x);
56 };
57 namespace VC__USE_NAMESPACE
58 #undef VC__USE_NAMESPACE
59 {
60  template<typename T> static Vc_ALWAYS_INLINE Vc_PURE Vector<T> sin(const Vector<T> &_x) {
62  }
63  template<typename T> static Vc_ALWAYS_INLINE Vc_PURE Vector<T> cos(const Vector<T> &_x) {
65  }
66  template<typename T> static Vc_ALWAYS_INLINE void sincos(const Vector<T> &_x, Vector<T> *_sin, Vector<T> *_cos) {
68  }
69  template<typename T> static Vc_ALWAYS_INLINE Vc_PURE Vector<T> asin (const Vector<T> &_x) {
71  }
72  template<typename T> static Vc_ALWAYS_INLINE Vc_PURE Vector<T> atan (const Vector<T> &_x) {
74  }
75  template<typename T> static Vc_ALWAYS_INLINE Vc_PURE Vector<T> atan2(const Vector<T> &y, const Vector<T> &x) {
77  }
78 } // namespace VC__USE_NAMESPACE
79 } // namespace Vc
80 } // namespace ROOT
81 
82 #include "undomacros.h"
83 #endif // VC_COMMON_TRIGONOMETRIC_H
Support for XOP instructions.
Definition: global.h:413
Namespace for new ROOT classes and functions.
Definition: ROOT.py:1
x86 SSE + SSE2 + SSE3 + SSSE3 + SSE4.1 + SSE4.2
Definition: global.h:389
static Vc_ALWAYS_INLINE Vc_PURE Vector< T > atan2(const Vector< T > &y, const Vector< T > &x)
Definition: trigonometric.h:75
Support for FMA4 instructions.
Definition: global.h:411
static Vector< T > cos(const Vector< T > &_x)
static Vc_ALWAYS_INLINE Vc_PURE Vector< T > asin(const Vector< T > &_x)
Definition: trigonometric.h:69
ImplementationT< MapImpl< VC_IMPL >::Value > TrigonometricImplementation
Definition: trigonometric.h:45
Double_t x[n]
Definition: legend1.C:17
static Vector< T > asin(const Vector< T > &_x)
#define Vc_PURE
Definition: macros.h:136
static Vector< T > atan(const Vector< T > &_x)
static Vc_ALWAYS_INLINE void sincos(const Vector< T > &_x, Vector< T > *_sin, Vector< T > *_cos)
Definition: trigonometric.h:66
static void sincos(const Vector< T > &_x, Vector< T > *_sin, Vector< T > *_cos)
static Vc_ALWAYS_INLINE Vc_PURE Vector< T > cos(const Vector< T > &_x)
Definition: trigonometric.h:63
static Vector< T > atan2(const Vector< T > &y, const Vector< T > &x)
#define Vc_ALWAYS_INLINE
Definition: macros.h:130
static Vc_ALWAYS_INLINE Vc_PURE Vector< T > sin(const Vector< T > &_x)
Definition: trigonometric.h:60
Double_t y[n]
Definition: legend1.C:17
static Vc_ALWAYS_INLINE Vc_PURE Vector< T > atan(const Vector< T > &_x)
Definition: trigonometric.h:72
#define VC__USE_NAMESPACE
Definition: math.h:115
Definition: casts.h:28
static Vector< T > sin(const Vector< T > &_x)