ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
const_data.h
Go to the documentation of this file.
1 /* This file is part of the Vc library. {{{
2 
3  Copyright (C) 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_SSE_CONST_DATA_H
21 #define VC_SSE_CONST_DATA_H
22 
23 #include "macros.h"
24 
25 namespace ROOT {
26 namespace Vc
27 {
28 namespace SSE
29 {
30 
31 ALIGN(16) extern const unsigned int _IndexesFromZero4[4];
32 ALIGN(16) extern const unsigned short _IndexesFromZero8[8];
33 ALIGN(16) extern const unsigned char _IndexesFromZero16[16];
34 
35 struct c_general
36 {
37  ALIGN(64) static const unsigned int allone[4];
38  ALIGN(16) static const unsigned short one16[8];
39  ALIGN(16) static const unsigned int one32[4];
40  ALIGN(16) static const float oneFloat[4];
41  ALIGN(16) static const double oneDouble[2];
42  ALIGN(16) static const int absMaskFloat[4];
43  ALIGN(16) static const long long absMaskDouble[2];
44  ALIGN(16) static const unsigned int signMaskFloat[4];
45  ALIGN(16) static const unsigned int highMaskFloat[4];
46  ALIGN(16) static const unsigned long long signMaskDouble[2];
47  ALIGN(16) static const unsigned long long highMaskDouble[2];
48  ALIGN(16) static const short minShort[8];
49  ALIGN(16) static const unsigned long long frexpMask[2];
50 };
51 
52 template<typename T> struct c_trig
53 {
54  ALIGN(64) static const T data[];
55 };
56 
57 template<typename T> struct c_log
58 {
59  enum VectorSize { Size = 16 / sizeof(T) };
60  static Vc_ALWAYS_INLINE Vc_CONST const float *d(int i) { return reinterpret_cast<const float *>(&data[i * Size]); }
61  ALIGN(64) static const unsigned int data[];
62 };
63 
64 template<> struct c_log<double>
65 {
66  enum VectorSize { Size = 16 / sizeof(double) };
67  static Vc_ALWAYS_INLINE Vc_CONST const double *d(int i) { return reinterpret_cast<const double *>(&data[i * Size]); }
68  ALIGN(64) static const unsigned long long data[];
69 };
70 
71 } // namespace SSE
72 } // namespace Vc
73 } // namespace ROOT
74 
75 #include "undomacros.h"
76 
77 #endif // VC_SSE_CONST_DATA_H
Small helper to encapsulate whether to return the value pointed to by the iterator or its address...
ALIGN(64) static const T data[]
TTree * T
static Vc_ALWAYS_INLINE Vc_CONST const float * d(int i)
Definition: const_data.h:60
static Vc_ALWAYS_INLINE Vc_CONST const double * d(int i)
Definition: const_data.h:67
#define Vc_CONST
Definition: macros.h:133
#define Vc_ALWAYS_INLINE
Definition: macros.h:130
#define SSE
Definition: global.h:84
ALIGN(16) extern const unsigned int _IndexesFromZero4[4]
ALIGN(64) static const unsigned int data[]